Skip to content

Commit

Permalink
feat(homepage): use secret for the config
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsimonemms committed Nov 19, 2024
1 parent 3f3d612 commit 43438d9
Show file tree
Hide file tree
Showing 2 changed files with 263 additions and 1 deletion.
252 changes: 252 additions & 0 deletions registry/components/homepage/all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
---
# Source: homepage/templates/common.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: homepage
labels:
app.kubernetes.io/instance: homepage
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: homepage
app.kubernetes.io/version: v0.9.6
helm.sh/chart: homepage-2.0.1
secrets:
- name: homepage-sa-token
---
# Source: homepage/templates/common.yaml
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: homepage-sa-token
labels:
app.kubernetes.io/instance: homepage
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: homepage
app.kubernetes.io/version: v0.9.6
helm.sh/chart: homepage-2.0.1
annotations:
kubernetes.io/service-account.name: homepage
---
# Source: homepage/templates/common.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: homepage
labels:
app.kubernetes.io/instance: homepage
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: homepage
app.kubernetes.io/version: v0.9.6
helm.sh/chart: homepage-2.0.1
rules:
- apiGroups:
- ""
resources:
- namespaces
- pods
- nodes
verbs:
- get
- list
- apiGroups:
- extensions
- networking.k8s.io
resources:
- ingresses
verbs:
- get
- list
- apiGroups:
- traefik.containo.us
- traefik.io
resources:
- ingressroutes
verbs:
- get
- list
- apiGroups:
- metrics.k8s.io
resources:
- nodes
- pods
verbs:
- get
- list
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions/status
verbs:
- get
---
# Source: homepage/templates/common.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: homepage
labels:
app.kubernetes.io/instance: homepage
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: homepage
app.kubernetes.io/version: v0.9.6
helm.sh/chart: homepage-2.0.1
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: homepage
subjects:
- kind: ServiceAccount
name: homepage
namespace: default
---
# Source: homepage/templates/common.yaml
apiVersion: v1
kind: Service
metadata:
name: homepage
labels:
app.kubernetes.io/service: homepage
app.kubernetes.io/instance: homepage
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: homepage
app.kubernetes.io/version: v0.9.6
helm.sh/chart: homepage-2.0.1
annotations:
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/instance: homepage
app.kubernetes.io/name: homepage
---
# Source: homepage/templates/common.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: homepage
labels:
app.kubernetes.io/instance: homepage
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: homepage
app.kubernetes.io/version: v0.9.6
helm.sh/chart: homepage-2.0.1
annotations:
configmap.reloader.stakater.com/reload: homepage
values-checksum: e571022cadec2383a11f62ded26db2f306534124e636c12c4bee171a25c02d07
spec:
revisionHistoryLimit: 3
replicas: 1
strategy:
type: RollingUpdate
selector:
matchLabels:
app.kubernetes.io/name: homepage
app.kubernetes.io/instance: homepage
template:
metadata:
labels:
app.kubernetes.io/name: homepage
app.kubernetes.io/instance: homepage
spec:

serviceAccountName: homepage
automountServiceAccountToken: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
containers:
- name: homepage
image: "ghcr.io/gethomepage/homepage:v0.9.6"
imagePullPolicy:
ports:
- name: http
containerPort: 3000
protocol: TCP
volumeMounts:
- name: homepage-config
subPath: bookmarks.yaml
mountPath: /app/config/bookmarks.yaml
- name: homepage-config
subPath: docker.yaml
mountPath: /app/config/docker.yaml
- name: homepage-config
subPath: kubernetes.yaml
mountPath: /app/config/kubernetes.yaml
- name: homepage-config
subPath: services.yaml
mountPath: /app/config/services.yaml
- name: homepage-config
subPath: settings.yaml
mountPath: /app/config/settings.yaml
- name: homepage-config
subPath: widgets.yaml
mountPath: /app/config/widgets.yaml
- name: logs
mountPath: /app/config/logs
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 0
periodSeconds: 10
tcpSocket:
port: 3000
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 0
periodSeconds: 10
tcpSocket:
port: 3000
timeoutSeconds: 1
startupProbe:
failureThreshold: 30
initialDelaySeconds: 0
periodSeconds: 5
tcpSocket:
port: 3000
timeoutSeconds: 1
volumes:
- name: homepage-config
configMap:
name: homepage
- name: logs
emptyDir:
{}
---
# Source: homepage/templates/common.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: homepage
labels:
app.kubernetes.io/instance: homepage
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: homepage
app.kubernetes.io/version: v0.9.6
helm.sh/chart: homepage-2.0.1
annotations:
cert-manager.io/cluster-issuer: letsencrypt
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/auth-realm: Authentication Required
nginx.ingress.kubernetes.io/auth-secret: basic-auth
nginx.ingress.kubernetes.io/auth-type: basic
spec:
ingressClassName: nginx
tls:
- hosts:
- "homepage.simonemms.com"
secretName: "homepage-tls"
rules:
- host: "homepage.simonemms.com"
http:
paths:
- path: "/"
pathType: Prefix
backend:
service:
name: homepage
port:
number: 3000
12 changes: 11 additions & 1 deletion registry/components/homepage/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- application.yaml
- all.yaml
- configmap.yaml
- namespace.yaml
patches:
- target:
group: apps
version: v1
kind: Deployment
name: homepage
patch: |-
- op: replace
path: /spec/replicas
value: 2

0 comments on commit 43438d9

Please sign in to comment.