CreateContainerConfigError.
This commit is contained in:
Alexis Bruneteau 2025-09-04 17:35:35 +02:00
parent 721cad0cc9
commit a1b7b8b0aa
7 changed files with 74 additions and 134 deletions

View File

@ -1,28 +1,18 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: homepage-config name: homepage
namespace: homepage namespace: default
labels: labels:
app.kubernetes.io/name: homepage app.kubernetes.io/name: homepage
data: data:
kubernetes.yaml: | kubernetes.yaml: |
mode: cluster mode: cluster
settings.yaml: | settings.yaml: ""
providers: #settings.yaml: |
openweathermap: openweathermapapikey # providers:
weatherapi: weatherapiapikey # longhorn:
title: Dashboard # url: https://longhorn.my.network
favicon: https://github.com/walkxcode/dashboard-icons/blob/main/png/homepage.png
theme: dark
color: slate
headerStyle: clean
layout:
My First Group:
style: row
columns: 3
My Second Group:
style: column
custom.css: "" custom.css: ""
custom.js: "" custom.js: ""
bookmarks.yaml: | bookmarks.yaml: |
@ -30,45 +20,21 @@ data:
- Github: - Github:
- abbr: GH - abbr: GH
href: https://github.com/ href: https://github.com/
- Docker Hub:
- abbr: DH
href: https://hub.docker.com/
- Social:
- Reddit:
- abbr: RE
href: https://www.reddit.com/
services.yaml: | services.yaml: |
- Infrastructure: - My First Group:
- Traefik: - My First Service:
href: http://traefik.local href: http://localhost/
description: Reverse Proxy & Load Balancer description: Homepage is awesome
icon: traefik.png
server: my-k3s
container: traefik
- Longhorn:
href: http://longhorn.local
description: Distributed Storage
icon: longhorn.png
- Monitoring: - My Second Group:
- Grafana: - My Second Service:
href: http://grafana.local href: http://localhost/
description: Analytics & Monitoring description: Homepage is the best
icon: grafana.png
- Prometheus:
href: http://prometheus.local
description: Metrics Collection
icon: prometheus.png
- Applications: - My Third Group:
- Nextcloud: - My Third Service:
href: http://nextcloud.local href: http://localhost/
description: File Sharing & Collaboration description: Homepage is 😎
icon: nextcloud.png
- Jellyfin:
href: http://jellyfin.local
description: Media Server
icon: jellyfin.png
widgets.yaml: | widgets.yaml: |
- kubernetes: - kubernetes:
cluster: cluster:
@ -76,7 +42,7 @@ data:
cpu: true cpu: true
memory: true memory: true
showLabel: true showLabel: true
label: "K3s Cluster" label: "cluster"
nodes: nodes:
show: true show: true
cpu: true cpu: true
@ -87,14 +53,8 @@ data:
expanded: true expanded: true
cpu: true cpu: true
memory: true memory: true
- datetime: network: default
text_size: xl
format:
timeStyle: short
dateStyle: short
hourCycle: h23
- search: - search:
provider: duckduckgo provider: duckduckgo
target: _blank target: _blank
showSearchSuggestions: true
docker.yaml: "" docker.yaml: ""

View File

@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: homepage name: homepage
namespace: homepage namespace: default
labels: labels:
app.kubernetes.io/name: homepage app.kubernetes.io/name: homepage
spec: spec:
@ -10,9 +10,6 @@ spec:
replicas: 1 replicas: 1
strategy: strategy:
type: RollingUpdate type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: homepage app.kubernetes.io/name: homepage
@ -25,75 +22,47 @@ spec:
automountServiceAccountToken: true automountServiceAccountToken: true
dnsPolicy: ClusterFirst dnsPolicy: ClusterFirst
enableServiceLinks: true enableServiceLinks: true
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers: containers:
- name: homepage - name: homepage
image: "ghcr.io/gethomepage/homepage:latest" image: "ghcr.io/gethomepage/homepage:latest"
imagePullPolicy: Always imagePullPolicy: Always
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
capabilities:
drop:
- ALL
env: env:
- name: HOMEPAGE_ALLOWED_HOSTS - name: HOMEPAGE_ALLOWED_HOSTS
value: "sortifal.fr,localhost" value: sortifal.fr # required, may need port. See gethomepage.dev/installation/#homepage_allowed_hosts
ports: ports:
- name: http - name: http
containerPort: 3000 containerPort: 3000
protocol: TCP protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
volumeMounts: volumeMounts:
- mountPath: /app/config - mountPath: /app/config/custom.js
name: config-writable
initContainers:
- name: config-setup
image: "busybox:1.36"
command: ['sh', '-c', 'cp -r /app/config-ro/* /app/config/ || true; chmod -R 755 /app/config; chown -R 1000:1000 /app/config']
securityContext:
runAsUser: 0
volumeMounts:
- mountPath: /app/config-ro
name: homepage-config name: homepage-config
- mountPath: /app/config subPath: custom.js
name: config-writable - mountPath: /app/config/custom.css
name: homepage-config
subPath: custom.css
- mountPath: /app/config/bookmarks.yaml
name: homepage-config
subPath: bookmarks.yaml
- mountPath: /app/config/docker.yaml
name: homepage-config
subPath: docker.yaml
- mountPath: /app/config/kubernetes.yaml
name: homepage-config
subPath: kubernetes.yaml
- mountPath: /app/config/services.yaml
name: homepage-config
subPath: services.yaml
- mountPath: /app/config/settings.yaml
name: homepage-config
subPath: settings.yaml
- mountPath: /app/config/widgets.yaml
name: homepage-config
subPath: widgets.yaml
- mountPath: /app/config/logs
name: logs
volumes: volumes:
- name: homepage-config - name: homepage-config
configMap: configMap:
name: homepage-config name: homepage
- name: logs - name: logs
emptyDir: {} emptyDir: {}
- name: config-writable
emptyDir: {}

View File

@ -10,7 +10,8 @@ resources:
- service.yaml - service.yaml
- deployment.yaml - deployment.yaml
- ingress.yaml - ingress.yaml
- secrets.yaml
- serviceaccount.yaml
commonLabels: commonLabels:
app: homepage app: homepage
version: v1.0.0 version: v1.0.0

View File

@ -23,7 +23,6 @@ rules:
- get - get
- list - list
- apiGroups: - apiGroups:
- traefik.containo.us
- traefik.io - traefik.io
resources: resources:
- ingressroutes - ingressroutes
@ -46,15 +45,6 @@ rules:
verbs: verbs:
- get - get
- list - list
- apiGroups:
- apps
resources:
- deployments
- replicasets
- statefulsets
verbs:
- get
- list
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -69,4 +59,4 @@ roleRef:
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: homepage name: homepage
namespace: homepage namespace: default

10
k8s/secret.yaml Normal file
View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: homepage
namespace: default
labels:
app.kubernetes.io/name: homepage
annotations:
kubernetes.io/service-account.name: homepage

View File

@ -2,9 +2,10 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: homepage name: homepage
namespace: homepage namespace: default
labels: labels:
app.kubernetes.io/name: homepage app.kubernetes.io/name: homepage
annotations:
spec: spec:
type: ClusterIP type: ClusterIP
ports: ports:

9
k8s/serviceaccount.yaml Normal file
View File

@ -0,0 +1,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: homepage
namespace: default
labels:
app.kubernetes.io/name: homepage
secrets:
- name: homepage