diff --git a/.helmignore b/.helmignore new file mode 100644 index 0000000..b0c1eb2 --- /dev/null +++ b/.helmignore @@ -0,0 +1 @@ +argocd-application.yaml diff --git a/Chart.lock b/Chart.lock new file mode 100644 index 0000000..bad12c4 --- /dev/null +++ b/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: frontend + repository: "" + version: 0.1.0 +- name: backend + repository: "" + version: 0.1.0 +digest: sha256:1140d4999433b0aeea61b30ba78833a3ac5d3844c7b80b9650490a74382e7a6b +generated: "2026-11-10T09:44:26.024447+01:00" diff --git a/Chart.yaml b/Chart.yaml new file mode 100644 index 0000000..ff8b09b --- /dev/null +++ b/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: collabry +description: Collabry (frontend + backend) as a single chart for Argo CD +type: application +version: 0.1.0 +# Subcharts are vendored in charts/ (no repository), so no dependency download is needed. +dependencies: + - name: frontend + version: 0.1.0 + - name: backend + version: 0.1.0 diff --git a/argocd-application.yaml b/argocd-application.yaml new file mode 100644 index 0000000..874e42b --- /dev/null +++ b/argocd-application.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: collabry + namespace: argocd +spec: + project: default + source: + repoURL: https://git.nhaiden.io/niklas/collabry-helm-chart.git + targetRevision: HEAD + path: . + destination: + server: https://kubernetes.default.svc + namespace: collabry + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/backend/templates/tests/test-connection.yaml b/backend/templates/tests/test-connection.yaml deleted file mode 100644 index bdbe4eb..0000000 --- a/backend/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "backend.fullname" . }}-test-connection" - labels: - {{- include "backend.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "backend.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/backend/.helmignore b/charts/backend/.helmignore similarity index 100% rename from backend/.helmignore rename to charts/backend/.helmignore diff --git a/backend/Chart.yaml b/charts/backend/Chart.yaml similarity index 100% rename from backend/Chart.yaml rename to charts/backend/Chart.yaml diff --git a/backend/templates/NOTES.txt b/charts/backend/templates/NOTES.txt similarity index 100% rename from backend/templates/NOTES.txt rename to charts/backend/templates/NOTES.txt diff --git a/backend/templates/_helpers.tpl b/charts/backend/templates/_helpers.tpl similarity index 100% rename from backend/templates/_helpers.tpl rename to charts/backend/templates/_helpers.tpl diff --git a/backend/templates/deployment.yaml b/charts/backend/templates/deployment.yaml similarity index 100% rename from backend/templates/deployment.yaml rename to charts/backend/templates/deployment.yaml diff --git a/backend/templates/hpa.yaml b/charts/backend/templates/hpa.yaml similarity index 100% rename from backend/templates/hpa.yaml rename to charts/backend/templates/hpa.yaml diff --git a/backend/templates/httproute.yaml b/charts/backend/templates/httproute.yaml similarity index 100% rename from backend/templates/httproute.yaml rename to charts/backend/templates/httproute.yaml diff --git a/backend/templates/ingress.yaml b/charts/backend/templates/ingress.yaml similarity index 100% rename from backend/templates/ingress.yaml rename to charts/backend/templates/ingress.yaml diff --git a/backend/templates/service.yaml b/charts/backend/templates/service.yaml similarity index 100% rename from backend/templates/service.yaml rename to charts/backend/templates/service.yaml diff --git a/backend/templates/serviceaccount.yaml b/charts/backend/templates/serviceaccount.yaml similarity index 100% rename from backend/templates/serviceaccount.yaml rename to charts/backend/templates/serviceaccount.yaml diff --git a/backend/values.yaml b/charts/backend/values.yaml similarity index 99% rename from backend/values.yaml rename to charts/backend/values.yaml index 6fd1e61..3477d25 100644 --- a/backend/values.yaml +++ b/charts/backend/values.yaml @@ -11,7 +11,7 @@ image: # This sets the pull policy for images. pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "2209c3fb" + tag: "11729b15" # This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ imagePullSecrets: [] diff --git a/frontend/.helmignore b/charts/frontend/.helmignore similarity index 100% rename from frontend/.helmignore rename to charts/frontend/.helmignore diff --git a/frontend/Chart.yaml b/charts/frontend/Chart.yaml similarity index 100% rename from frontend/Chart.yaml rename to charts/frontend/Chart.yaml diff --git a/frontend/templates/NOTES.txt b/charts/frontend/templates/NOTES.txt similarity index 100% rename from frontend/templates/NOTES.txt rename to charts/frontend/templates/NOTES.txt diff --git a/frontend/templates/_helpers.tpl b/charts/frontend/templates/_helpers.tpl similarity index 100% rename from frontend/templates/_helpers.tpl rename to charts/frontend/templates/_helpers.tpl diff --git a/frontend/templates/deployment.yaml b/charts/frontend/templates/deployment.yaml similarity index 95% rename from frontend/templates/deployment.yaml rename to charts/frontend/templates/deployment.yaml index b6fa9e4..cf5d29f 100644 --- a/frontend/templates/deployment.yaml +++ b/charts/frontend/templates/deployment.yaml @@ -60,6 +60,10 @@ spec: volumeMounts: {{- toYaml . | nindent 12 }} {{- end }} + {{- with .Values.appConfig }} + env: + {{- toYaml . | nindent 12 }} + {{- end }} {{- with .Values.volumes }} volumes: {{- toYaml . | nindent 8 }} diff --git a/frontend/templates/hpa.yaml b/charts/frontend/templates/hpa.yaml similarity index 100% rename from frontend/templates/hpa.yaml rename to charts/frontend/templates/hpa.yaml diff --git a/frontend/templates/httproute.yaml b/charts/frontend/templates/httproute.yaml similarity index 100% rename from frontend/templates/httproute.yaml rename to charts/frontend/templates/httproute.yaml diff --git a/frontend/templates/ingress.yaml b/charts/frontend/templates/ingress.yaml similarity index 100% rename from frontend/templates/ingress.yaml rename to charts/frontend/templates/ingress.yaml diff --git a/frontend/templates/service.yaml b/charts/frontend/templates/service.yaml similarity index 100% rename from frontend/templates/service.yaml rename to charts/frontend/templates/service.yaml diff --git a/frontend/templates/serviceaccount.yaml b/charts/frontend/templates/serviceaccount.yaml similarity index 100% rename from frontend/templates/serviceaccount.yaml rename to charts/frontend/templates/serviceaccount.yaml diff --git a/frontend/values.yaml b/charts/frontend/values.yaml similarity index 98% rename from frontend/values.yaml rename to charts/frontend/values.yaml index a0f366d..eaedbb3 100644 --- a/frontend/values.yaml +++ b/charts/frontend/values.yaml @@ -11,7 +11,7 @@ image: # This sets the pull policy for images. pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "89fa5c9a" + tag: "11729b15" # This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ imagePullSecrets: [] @@ -159,3 +159,7 @@ nodeSelector: {} tolerations: [] affinity: {} + +appConfig: + - name: API_SERVER + value: http://backend:8080 \ No newline at end of file diff --git a/frontend/templates/tests/test-connection.yaml b/frontend/templates/tests/test-connection.yaml deleted file mode 100644 index 372ac5e..0000000 --- a/frontend/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "frontend.fullname" . }}-test-connection" - labels: - {{- include "frontend.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "frontend.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/secret-ref.yml b/templates/externalsecret.yaml similarity index 82% rename from secret-ref.yml rename to templates/externalsecret.yaml index 8c45fa1..fa0c2ef 100644 --- a/secret-ref.yml +++ b/templates/externalsecret.yaml @@ -2,7 +2,6 @@ apiVersion: external-secrets.io/v1 kind: ExternalSecret metadata: name: collabry - namespace: collabry spec: refreshInterval: 1h secretStoreRef: @@ -10,4 +9,4 @@ spec: kind: ClusterSecretStore dataFrom: - extract: - key: k8s/collabry \ No newline at end of file + key: k8s/collabry diff --git a/values.yaml b/values.yaml new file mode 100644 index 0000000..489439c --- /dev/null +++ b/values.yaml @@ -0,0 +1,9 @@ +# Per-app settings live in charts//values.yaml; anything here overrides them. + +# Fixed names so resources stay "frontend"/"backend" regardless of the Argo CD app/release name +# (frontend reaches the API at http://backend:8080). +frontend: + fullnameOverride: frontend + +backend: + fullnameOverride: backend