Skip to content

Commit 0e326f1

Browse files
committed
updating argocd example with sealed secrets
1 parent 43458ba commit 0e326f1

39 files changed

+537
-88
lines changed

incubator/argo-cd/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,27 @@
11
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
2+
3+
4+
## Create a secret which will store our ldap user credentials
5+
kubectl create secret generic sealed-credential --dry-run=client --from-file=ldap.txt=./ldap.txt --from-file=bearer.txt=./bearer.txt --from-file=plain-jaas.conf=./plain-jaas.conf -o yaml > sealed-credential-source.yaml
6+
7+
## Creat Sealed Secret (this must be created after sealed-secrets has been deployed)
8+
kubeseal --scope cluster-wide <sealed-credential-source.yaml> ./sealed-credential.yaml --controller-name=sealed-secrets --controller-namespace default
9+
10+
kubeseal --scope cluster-wide <sealed-credential-source.yaml> ../environments/base/secrets/sealed-credential.yaml --controller-name=sealed-secrets --controller-namespace default
11+
12+
kubectl apply -f sealed-credential.yaml
13+
```
14+
sealedsecret.bitnami.com/sealed-credential created
15+
```
16+
17+
18+
19+
## Sealed Secrets
20+
Install a local kubeseal CLI
21+
22+
helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
23+
helm search repo confluent --versions
24+
helm template sealed-secrets/sealed-secrets --version 2.1.4 --include-crds --output-dir .
25+
26+
27+

incubator/argo-cd/argo-apps/confluent-dev.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
apiVersion: argoproj.io/v1alpha1
3-
kind: Application
2+
kind: "Application"
3+
apiVersion: "argoproj.io/v1alpha1"
44
metadata:
5-
name: confluent-dev
6-
namespace: argocd
7-
finalizers:
8-
- resources-finalizer.argocd.argoproj.io
5+
creationTimestamp: "2022-02-28T09:23:24Z"
6+
name: "confluent-dev"
7+
namespace: "argocd"
8+
resourceVersion: "131538"
9+
uid: "df0737c5-50c9-4539-b5aa-1e42c5016017"
910
spec:
10-
project: default
11-
source:
12-
path: incubator/argo-cd/environments/dev
13-
repoURL: https://github.com/osodevops/confluent-kubernetes-playground.git
14-
targetRevision: HEAD
1511
destination:
16-
namespace: dev
17-
server: https://kubernetes.default.svc
12+
namespace: "dev"
13+
server: "https://kubernetes.default.svc"
14+
project: "default"
15+
source:
16+
path: "incubator/argo-cd/environments/dev"
17+
repoURL: "https://github.com/osodevops/confluent-kubernetes-playground.git"
18+
targetRevision: "HEAD"
1819
syncPolicy:
1920
automated:
2021
prune: true

incubator/argo-cd/argo-apps/confluent-prod.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
apiVersion: argoproj.io/v1alpha1
3-
kind: Application
2+
kind: "Application"
3+
apiVersion: "argoproj.io/v1alpha1"
44
metadata:
5-
name: confluent-prod
6-
namespace: argocd
7-
finalizers:
8-
- resources-finalizer.argocd.argoproj.io
5+
creationTimestamp: "2022-02-28T09:23:24Z"
6+
name: "confluent-prod"
7+
namespace: "argocd"
8+
resourceVersion: "79200"
9+
uid: "8a98c871-dde8-4b5a-85eb-5b9d7c8f85f7"
910
spec:
10-
project: default
11-
source:
12-
path: incubator/argo-cd/environments/prod
13-
repoURL: https://github.com/osodevops/confluent-kubernetes-playground.git
14-
targetRevision: HEAD
1511
destination:
16-
namespace: prod
17-
server: https://kubernetes.default.svc
12+
namespace: "prod"
13+
server: "https://kubernetes.default.svc"
14+
project: "default"
15+
source:
16+
path: "incubator/argo-cd/environments/prod"
17+
repoURL: "https://github.com/osodevops/confluent-kubernetes-playground.git"
18+
targetRevision: "HEAD"
1819
syncPolicy:
1920
automated:
2021
prune: true

incubator/argo-cd/argo-apps/confluent-test.yaml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
---
2-
apiVersion: argoproj.io/v1alpha1
3-
kind: Application
2+
kind: "Application"
3+
apiVersion: "argoproj.io/v1alpha1"
44
metadata:
5-
name: confluent-test
6-
namespace: argocd
7-
finalizers:
8-
- resources-finalizer.argocd.argoproj.io
5+
creationTimestamp: "2022-02-28T09:23:24Z"
6+
generation: 1020
7+
name: "confluent-test"
8+
namespace: "argocd"
9+
resourceVersion: "131537"
10+
uid: "1c2d5e0e-4817-4f3b-aed0-dd804e101f84"
911
spec:
10-
project: default
11-
source:
12-
path: incubator/argo-cd/environments/test
13-
repoURL: https://github.com/osodevops/confluent-kubernetes-playground.git
14-
targetRevision: HEAD
1512
destination:
16-
namespace: test
17-
server: https://kubernetes.default.svc
13+
namespace: "test"
14+
server: "https://kubernetes.default.svc"
15+
project: "default"
16+
source:
17+
path: "incubator/argo-cd/environments/test"
18+
repoURL: "https://github.com/osodevops/confluent-kubernetes-playground.git"
19+
targetRevision: "HEAD"
1820
syncPolicy:
1921
automated:
2022
prune: true

incubator/argo-cd/argo-apps/kustomization.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
namespace: argocd
44
resources:
5-
- confluent-dev.yaml
6-
- confluent-prod.yaml
7-
- confluent-test.yaml
5+
#- confluent-dev.yaml
6+
#- confluent-prod.yaml
7+
#- confluent-test.yaml
88
- ldap.yaml
99
- operator.yaml
1010
- operator-repo.yaml
11+
- sealed-secrets.yaml

incubator/argo-cd/argo-apps/operator.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
kind: "Application"
33
apiVersion: "argoproj.io/v1alpha1"
44
metadata:
5-
creationTimestamp: "2022-02-25T13:02:35Z"
6-
generation: 11
5+
creationTimestamp: "2022-02-28T09:23:24Z"
76
name: "cfk-operator"
87
namespace: "argocd"
9-
resourceVersion: "941"
10-
uid: "88bd170e-eb1f-42da-a834-aca2ec622105"
8+
resourceVersion: "79201"
9+
uid: "82e1ff7e-fcf8-4b91-93fa-229435618f19"
1110
spec:
1211
destination:
1312
namespace: "argocd"
@@ -22,7 +21,7 @@ spec:
2221
valueFiles:
2322
- "values.yaml"
2423
repoURL: "https://packages.confluent.io/helm"
25-
targetRevision: "0.304.17"
24+
targetRevision: "0.304.2"
2625
syncPolicy:
2726
automated:
2827
prune: true
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: sealed-secrets
5+
namespace: argocd
6+
spec:
7+
project: default
8+
source:
9+
chart: sealed-secrets
10+
repoURL: https://bitnami-labs.github.io/sealed-secrets
11+
targetRevision: 2.1.4
12+
helm:
13+
releaseName: sealed-secrets
14+
destination:
15+
server: https://kubernetes.default.svc
16+
namespace: default
17+
syncPolicy:
18+
automated:
19+
prune: true
20+
selfHeal: true

incubator/argo-cd/argo-cd/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
namespace: argocd
44
resources:
5-
- namespace.yaml
65
- argocd.yaml
76

87

incubator/argo-cd/argo-cd/namespace.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: platform.confluent.io/v1beta1
2+
kind: Connect
3+
metadata:
4+
name: connect
5+
spec:
6+
replicas: 0
7+
image:
8+
application: confluentinc/cp-server-connect:7.0.1
9+
init: confluentinc/confluent-init-container:2.2.0
10+
tls:
11+
autoGeneratedCerts: true
12+
configOverrides:
13+
server:
14+
- offset.storage.replication.factor=1
15+
- status.storage.replication.factor=1
16+
- config.storage.replication.factor=1
17+
- confluent.topic.replication.factor=1
18+
authorization:
19+
type: rbac
20+
dependencies:
21+
kafka:
22+
bootstrapEndpoint: kafka:9071
23+
authentication:
24+
type: mtls
25+
tls:
26+
enabled: true
27+
mds:
28+
endpoint: https://kafka:8090
29+
tokenKeyPair:
30+
secretRef: mds-public
31+
authentication:
32+
type: bearer
33+
bearer:
34+
secretRef: sealed-credential

0 commit comments

Comments
 (0)