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

feat(simple-workflow): Add secretsEngine support for Sealed Secrets #275

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

schahal
Copy link
Contributor

@schahal schahal commented Feb 28, 2024

Related to what was done for other charts as well: #261 (Ideally, simple-workflows would've been added to that as well).

Test

Original values.test.yaml

secretsEngine: plaintext
secrets:
  foo: bar

New values.test.yaml (after generating a sealed secret)

secretsEngine: sealed
secrets:
  foo: AgATvuwJ73WsrfdjBgy3ack++p4D8PpPIKas4B9KD4wPzKhPTkJCYZSxsA6h12cqPNdWMc4wrzgldKluVZY/g8Kmn0u54kupAr04WV9FXVUekCLtKl210MEffbZCbrUDQ58Yegpy7wSBgy6/qBynqq0Bj0qPXbHZiVNgQimefyeeB36Vw8JdZ6JoIPto8AdpIZADa6buIGBsj0+cyLbrL1RP04s7jq+uAi8V1ro6vtdtv6RPHttNBFrOHQpjBhhSNu5X/dAIlMLGfvs0oV+udHG6lDhYQdaG5DJZCImXFnIU86qUSCS318GuGSXwoSejytsZimOw5U1oFu67RBHj6FzsmEc15mkAEKy51FsqSutQL6QnpWlBTvTcLYLi/qSKMTLC0+oqw6FC8e+d2k8zZL8nDffqgtwCa9GRwtby1R1OP0+7g1GawYlHAv+URLfjdJZmZF4vKzwxMBuHzXfJqj7aVSqLmpl29eDnjkhyEue0FAgYODoHneUxHvKQ7VqoFAt8n+t+2ZBcD+/ddslqgvUYG6lshQe2xQMdONqXwbC0POGDeyD57fvkfvaDXzsJYfqo5yuMuDu9k1bicdRKvHxCMGj8tUAXdJC+Sv0KnQJoLYt+QjEizno/SeQBteMqfmc8Emf9ExlNhBpRclvDSuRuFyCdE1jfGWT44LgzZuBeeBcwaEjBB9kJX2GjTriGti6JeE8=

Resulting Helm Diff

--- /tmp/orig.yaml	2024-02-28 10:34:01
+++ /tmp/new.yaml	2024-02-28 10:34:56
@@ -2,14 +2,6 @@
 helm dependency update .
 helm template --debug --values values.yaml --values values.test.yaml simple-workflow .
 ---
-# Source: simple-workflow/templates/secret.yaml
-apiVersion: v1
-kind: Secret
-metadata:
-  name: simple-workflow-secrets
-data:
-  FOO: YmFy
----
 # Source: simple-workflow/templates/roles-and-rolebindings.yaml
 apiVersion: rbac.authorization.k8s.io/v1
 kind: Role
@@ -53,6 +45,20 @@
   - kind: ServiceAccount
     name: workflow-service-account
     namespace: simple-workflow
+---
+# Source: simple-workflow/templates/sealedsecret.yaml
+apiVersion: bitnami.com/v1alpha1
+kind: SealedSecret
+metadata:
+  name: simple-workflow-secrets
+  annotations:
+    sealedsecrets.bitnami.com/namespace-wide: "true"
+spec:
+  encryptedData:
+    foo: "AgATvuwJ73WsrfdjBgy3ack++p4D8PpPIKas4B9KD4wPzKhPTkJCYZSxsA6h12cqPNdWMc4wrzgldKluVZY/g8Kmn0u54kupAr04WV9FXVUekCLtKl210MEffbZCbrUDQ58Yegpy7wSBgy6/qBynqq0Bj0qPXbHZiVNgQimefyeeB36Vw8JdZ6JoIPto8AdpIZADa6buIGBsj0+cyLbrL1RP04s7jq+uAi8V1ro6vtdtv6RPHttNBFrOHQpjBhhSNu5X/dAIlMLGfvs0oV+udHG6lDhYQdaG5DJZCImXFnIU86qUSCS318GuGSXwoSejytsZimOw5U1oFu67RBHj6FzsmEc15mkAEKy51FsqSutQL6QnpWlBTvTcLYLi/qSKMTLC0+oqw6FC8e+d2k8zZL8nDffqgtwCa9GRwtby1R1OP0+7g1GawYlHAv+URLfjdJZmZF4vKzwxMBuHzXfJqj7aVSqLmpl29eDnjkhyEue0FAgYODoHneUxHvKQ7VqoFAt8n+t+2ZBcD+/ddslqgvUYG6lshQe2xQMdONqXwbC0POGDeyD57fvkfvaDXzsJYfqo5yuMuDu9k1bicdRKvHxCMGj8tUAXdJC+Sv0KnQJoLYt+QjEizno/SeQBteMqfmc8Emf9ExlNhBpRclvDSuRuFyCdE1jfGWT44LgzZuBeeBcwaEjBB9kJX2GjTriGti6JeE8="
+  template:
+    metadata:
+      name: simple-workflow-secrets
 ---
 # Source: simple-workflow/templates/workflow-pipeline.yaml
 apiVersion: argoproj.io/v1alpha1

@schahal schahal requested a review from a team as a code owner February 28, 2024 18:41
@schahal schahal merged commit 4031515 into main Feb 28, 2024
2 checks passed
@schahal schahal deleted the feat/sealed-secret-workflow branch February 28, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants