Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressing several lingering issues #29

Merged
merged 9 commits into from
Aug 12, 2024
Merged

Addressing several lingering issues #29

merged 9 commits into from
Aug 12, 2024

Conversation

jameswynn
Copy link
Owner

  • Resource names are now consistent - RBAC resources and Config Maps now match the names used by the rest of the resources
  • Updated all references to the old Homepage repository
  • Support for extra cluster roles

resolves #23
resolves #25
resolves #26
resolves #18

@@ -39,5 +39,8 @@ subPath:
{{- $_ := set .Values.serviceAccount "create" "true" -}}
{{ end }}

{{ include "homepage.configmap" . }}
{{ include "homepage.rbac" . }}

Copy link

@victorbiga victorbiga Aug 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to add external secret to the deployment env, any way to reference it in values ?

          env:
            - name: MY_SECRET_ENV_VAR
              valueFrom:
                secretKeyRef:
                  name: my-secrets
                  key: my-secret-key

as actual how it would look in the homepage configs, example here https://github.com/Rapha-Borges/home-server/blob/51693a8fe84c70e8981846ce491816ea289a5f70/homepage/config/services.yaml#L12-L13

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually already supported via the library.

envFrom:
  - secretRef:
      name: my-secret
  - configMapRef:
      name: my-configmap

I'll add an example to the values.yaml so its easier to find this extension point.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is cool, just helm templated this. 🚀

---
# Source: homepage/templates/common.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: release-name
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: release-name
    app.kubernetes.io/version: v0.6.10
    helm.sh/chart: homepage-1.2.3
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app.kubernetes.io/name: release-name
      app.kubernetes.io/instance: release-name
  template:
    metadata:
      labels:
        app.kubernetes.io/name: release-name
        app.kubernetes.io/instance: release-name
    spec:

      serviceAccountName: homepage
      automountServiceAccountToken: true
      dnsPolicy: ClusterFirst
      enableServiceLinks: true
      containers:
        - name: release-name
          image: "ghcr.io/gethomepage/homepage:v0.9.5"
          imagePullPolicy:
          envFrom:
            - secretRef:
                name: my-secret
            - configMapRef:
                name: my-configmap
          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: release-name
        - name: logs
          emptyDir:
            {}

Thanks ! 🥇

@@ -99,6 +108,14 @@ config:
docker:
settings:

# To include environment variables from other configs or other secrets for use in
# Homepage's variable substitutions. Refer to them here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@jameswynn jameswynn merged commit ef903e4 into main Aug 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants