From 0fef80f22a19da1e5451a16d7a8a097567929d82 Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Sat, 14 Sep 2024 21:13:05 +0200 Subject: [PATCH] Add patch argocd --- argocd/kustomization.yaml | 2 + ...argocd-notifications-controller-patch.yaml | 119 ++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 argocd/overlays/argocd-notifications-controller-patch.yaml diff --git a/argocd/kustomization.yaml b/argocd/kustomization.yaml index 80c2766..01a63f9 100644 --- a/argocd/kustomization.yaml +++ b/argocd/kustomization.yaml @@ -9,3 +9,5 @@ resources: - https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/install.yaml?ref=stable - ingress.yaml +patches: + - overlays/argocd-notifications-controller-patch.yaml diff --git a/argocd/overlays/argocd-notifications-controller-patch.yaml b/argocd/overlays/argocd-notifications-controller-patch.yaml new file mode 100644 index 0000000..30366a6 --- /dev/null +++ b/argocd/overlays/argocd-notifications-controller-patch.yaml @@ -0,0 +1,119 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + deployment.kubernetes.io/revision: '3' + kubectl.kubernetes.io/last-applied-configuration: > + {"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"labels":{"app.kubernetes.io/component":"notifications-controller","app.kubernetes.io/instance":"argocd-folder","app.kubernetes.io/name":"argocd-notifications-controller","app.kubernetes.io/part-of":"argocd"},"name":"argocd-notifications-controller","namespace":"argocd"},"spec":{"selector":{"matchLabels":{"app.kubernetes.io/name":"argocd-notifications-controller"}},"strategy":{"type":"Recreate"},"template":{"metadata":{"labels":{"app.kubernetes.io/name":"argocd-notifications-controller"}},"spec":{"containers":[{"args":["/usr/local/bin/argocd-notifications"],"env":[{"name":"ARGOCD_NOTIFICATIONS_CONTROLLER_LOGFORMAT","valueFrom":{"configMapKeyRef":{"key":"notificationscontroller.log.format","name":"argocd-cmd-params-cm","optional":true}}},{"name":"ARGOCD_NOTIFICATIONS_CONTROLLER_LOGLEVEL","valueFrom":{"configMapKeyRef":{"key":"notificationscontroller.log.level","name":"argocd-cmd-params-cm","optional":true}}},{"name":"ARGOCD_APPLICATION_NAMESPACES","valueFrom":{"configMapKeyRef":{"key":"application.namespaces","name":"argocd-cmd-params-cm","optional":true}}},{"name":"ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED","valueFrom":{"configMapKeyRef":{"key":"notificationscontroller.selfservice.enabled","name":"argocd-cmd-params-cm","optional":true}}},{"name":"ARGOCD_NOTIFICATION_CONTROLLER_REPO_SERVER_PLAINTEXT","valueFrom":{"configMapKeyRef":{"key":"notificationscontroller.repo.server.plaintext","name":"argocd-cmd-params-cm","optional":true}}}],"image":"quay.io/argoproj/argocd:latest","imagePullPolicy":"Always","livenessProbe":{"tcpSocket":{"port":9001}},"name":"argocd-notifications-controller","securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true},"volumeMounts":[{"mountPath":"/app/config/tls","name":"tls-certs"},{"mountPath":"/app/config/reposerver/tls","name":"argocd-repo-server-tls"}],"workingDir":"/app"}],"securityContext":{"runAsNonRoot":true,"seccompProfile":{"type":"RuntimeDefault"}},"serviceAccountName":"argocd-notifications-controller","volumes":[{"configMap":{"name":"argocd-tls-certs-cm"},"name":"tls-certs"},{"name":"argocd-repo-server-tls","secret":{"items":[{"key":"tls.crt","path":"tls.crt"},{"key":"tls.key","path":"tls.key"},{"key":"ca.crt","path":"ca.crt"}],"optional":true,"secretName":"argocd-repo-server-tls"}}]}}}} + creationTimestamp: '2024-09-13T20:04:38Z' + generation: 3 + labels: + app.kubernetes.io/component: notifications-controller + app.kubernetes.io/instance: argocd-folder + app.kubernetes.io/name: argocd-notifications-controller + app.kubernetes.io/part-of: argocd + name: argocd-notifications-controller + namespace: argocd + resourceVersion: '271786' + uid: a8f9e96d-d6b2-4958-8352-2fe443ae465e +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app.kubernetes.io/name: argocd-notifications-controller + strategy: + type: Recreate + template: + metadata: + creationTimestamp: null + labels: + app.kubernetes.io/name: argocd-notifications-controller + spec: + containers: + - args: + - /usr/local/bin/argocd-notifications + env: + - name: ARGOCD_NOTIFICATIONS_CONTROLLER_LOGFORMAT + valueFrom: + configMapKeyRef: + key: notificationscontroller.log.format + name: argocd-cmd-params-cm + optional: true + - name: ARGOCD_NOTIFICATIONS_CONTROLLER_LOGLEVEL + valueFrom: + configMapKeyRef: + key: notificationscontroller.log.level + name: argocd-cmd-params-cm + optional: true + - name: ARGOCD_APPLICATION_NAMESPACES + valueFrom: + configMapKeyRef: + key: application.namespaces + name: argocd-cmd-params-cm + optional: true + - name: ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED + valueFrom: + configMapKeyRef: + key: notificationscontroller.selfservice.enabled + name: argocd-cmd-params-cm + optional: true + - name: ARGOCD_NOTIFICATION_CONTROLLER_REPO_SERVER_PLAINTEXT + valueFrom: + configMapKeyRef: + key: notificationscontroller.repo.server.plaintext + name: argocd-cmd-params-cm + optional: true + image: quay.io/argoproj/argocd:latest + imagePullPolicy: Always + # livenessProbe: + # failureThreshold: 3 + # periodSeconds: 10 + # successThreshold: 1 + # tcpSocket: + # port: 9001 + # timeoutSeconds: 1 + name: argocd-notifications-controller + resources: {} + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /app/config/tls + name: tls-certs + - mountPath: /app/config/reposerver/tls + name: argocd-repo-server-tls + workingDir: /app + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccount: argocd-notifications-controller + serviceAccountName: argocd-notifications-controller + terminationGracePeriodSeconds: 30 + volumes: + - configMap: + defaultMode: 420 + name: argocd-tls-certs-cm + name: tls-certs + - name: argocd-repo-server-tls + secret: + defaultMode: 420 + items: + - key: tls.crt + path: tls.crt + - key: tls.key + path: tls.key + - key: ca.crt + path: ca.crt + optional: true + secretName: argocd-repo-server-tls \ No newline at end of file