From 7907972242fd8d5bfbc432e8510a5edb43821882 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Sat, 22 Feb 2025 15:57:55 -0600 Subject: [PATCH] add argo workflows --- .../management/argo-workflows/Chart.yaml | 31 +++++ .../templates/external-secret.yaml | 62 ++++++++++ .../management/argo-workflows/values.yaml | 113 ++++++++++++++++++ 3 files changed, 206 insertions(+) create mode 100644 clusters/cl01tl/management/argo-workflows/Chart.yaml create mode 100644 clusters/cl01tl/management/argo-workflows/templates/external-secret.yaml create mode 100644 clusters/cl01tl/management/argo-workflows/values.yaml diff --git a/clusters/cl01tl/management/argo-workflows/Chart.yaml b/clusters/cl01tl/management/argo-workflows/Chart.yaml new file mode 100644 index 000000000..1e0bf3b4b --- /dev/null +++ b/clusters/cl01tl/management/argo-workflows/Chart.yaml @@ -0,0 +1,31 @@ +apiVersion: v2 +name: argo-workflows +version: 1.0.0 +description: Argo Workflows +keywords: + - argo-workflows + - argo-events + - workflows + - events +home: https://wiki.alexlebens.dev/doc/argo-workflows-bRGiuUyLgj +sources: + - https://github.com/argoproj/argo-workflows + - https://github.com/argoproj/argo-events + - https://github.com/cloudnative-pg/cloudnative-pg + - https://github.com/argoproj/argo-helm/tree/main/charts + - https://github.com/alexlebens/helm-charts/charts/postgres-cluster +maintainers: + - name: alexlebens +dependencies: + - name: argo-workflows + version: 0.45.6 + repository: https://argoproj.github.io/argo-helm + - name: argo-events + version: 2.4.13 + repository: https://argoproj.github.io/argo-helm + - name: postgres-cluster + alias: postgres-17-cluster + version: 4.1.4 + repository: http://alexlebens.github.io/helm-charts +icon: https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/png/argocd.png +appVersion: v3.6.2 diff --git a/clusters/cl01tl/management/argo-workflows/templates/external-secret.yaml b/clusters/cl01tl/management/argo-workflows/templates/external-secret.yaml new file mode 100644 index 000000000..46309f6b6 --- /dev/null +++ b/clusters/cl01tl/management/argo-workflows/templates/external-secret.yaml @@ -0,0 +1,62 @@ +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: argo-workflows-oidc-secret + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: argo-workflows-oidc-secret + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: web + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + secretStoreRef: + kind: ClusterSecretStore + name: vault + data: + - secretKey: secret + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /authentik/oidc/argo-workflows + metadataPolicy: None + property: secret + - secretKey: client + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /authentik/oidc/argo-workflows + metadataPolicy: None + property: client + +--- +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: argo-workflows-postgresql-17-cluster-backup-secret + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: argo-workflows-postgresql-17-cluster-backup-secret + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: database + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + secretStoreRef: + kind: ClusterSecretStore + name: vault + data: + - secretKey: ACCESS_KEY_ID + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /digital-ocean/home-infra/postgres-backups + metadataPolicy: None + property: access + - secretKey: ACCESS_SECRET_KEY + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /digital-ocean/home-infra/postgres-backups + metadataPolicy: None + property: secret diff --git a/clusters/cl01tl/management/argo-workflows/values.yaml b/clusters/cl01tl/management/argo-workflows/values.yaml new file mode 100644 index 000000000..ddf833edb --- /dev/null +++ b/clusters/cl01tl/management/argo-workflows/values.yaml @@ -0,0 +1,113 @@ +argo-workflows: + controller: + metricsConfig: + enabled: true + persistence: + connectionPool: + maxIdleConns: 100 + maxOpenConns: 0 + nodeStatusOffLoad: true + archive: true + postgresql: + host: argo-workflows-postgresql-17-cluster-rw + port: 5432 + database: app + tableName: app + userNameSecret: + name: argo-workflows-postgresql-17-cluster-app + key: username + passwordSecret: + name: argo-workflows-postgresql-17-cluster-app + key: password + ssl: false + sslMode: disable + workflowWorkers: 2 + workflowTTLWorkers: 1 + podCleanupWorkers: 1 + cronWorkflowWorkers: 1 + resources: + requests: + cpu: 10m + memory: 128Mi + serviceMonitor: + enabled: true + name: workflow-controller + workflowNamespaces: + - argocd + server: + authModes: + - sso + ingress: + enabled: true + ingressClassName: tailscale + hosts: + - argo-workflows-cl01tl + tls: + - secretName: argo-workflows-cl01tl + hosts: + - argo-workflows-cl01tl + sso: + enabled: true + issuer: https://auth-cl01tl.boreal-beaufort.ts.net/application/o/argo-workflows/ + clientId: + name: argo-workflows-oidc-secret + key: client + clientSecret: + name: argo-workflows-oidc-secret + key: secret + redirectUrl: https://argo-workflows-cl01tl.boreal-beaufort.ts.net/oauth2/callback + rbac: + enabled: false + scopes: + - openid + - email + - profile + useStaticCredentials: true + artifactRepository: + archiveLogs: false + s3: {} + # accessKeySecret: + # name: "{{ .Release.Name }}-minio" + # key: accesskey + # secretKeySecret: + # name: "{{ .Release.Name }}-minio" + # key: secretkey + # insecure: true + # bucket: + # endpoint: + # region: + # encryptionOptions: + # enableEncryption: true + +argo-events: + controller: + resources: + requests: + cpu: 10m + memory: 128Mi + metrics: + enabled: true + serviceMonitor: + enabled: true + namespace: argocd + webhook: + enabled: true + resources: + requests: + cpu: 10m + memory: 128Mi +postgres-17-cluster: + mode: standalone + cluster: + walStorage: + storageClass: local-path + storage: + storageClass: local-path + monitoring: + enabled: true + backup: + enabled: true + endpointURL: https://nyc3.digitaloceanspaces.com + destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/argo-workflows/argo-workflows-postgresql-17-cluster + endpointCredentials: argo-workflows-postgresql-17-cluster-backup-secret + backupIndex: 1