Skip to content

Commit

Permalink
Add tls cert mount for appset controller (#599)
Browse files Browse the repository at this point in the history
Signed-off-by: Siddhesh Ghadi <[email protected]>
  • Loading branch information
svghadi authored Sep 12, 2023
1 parent 9f7824a commit 17e173d
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 7 deletions.
5 changes: 5 additions & 0 deletions bundle/manifests/argoproj.io_argocds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6655,6 +6655,11 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
scmRootCAConfigMap:
description: SCMRootCAConfigMap is the name of the config map
that stores the Gitlab SCM Provider's TLS certificate which
will be mounted on the ApplicationSet Controller (optional).
type: string
version:
description: Version is the Argo CD ApplicationSet image tag.
(optional)
Expand Down
7 changes: 6 additions & 1 deletion config/crd/bases/argoproj.io_argocds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6646,6 +6646,11 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
scmRootCAConfigMap:
description: SCMRootCAConfigMap is the name of the config map
that stores the Gitlab SCM Provider's TLS certificate which
will be mounted on the ApplicationSet Controller (optional).
type: string
version:
description: Version is the Argo CD ApplicationSet image tag.
(optional)
Expand Down Expand Up @@ -12813,4 +12818,4 @@ status:
kind: ""
plural: ""
conditions: []
storedVersions: []
storedVersions: []
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/argoproj-labs/argo-rollouts-manager v0.0.2-0.20230515023837-0632f3e856d5
github.com/argoproj-labs/argocd-operator v0.0.16-0.20230904085417-8ddbce30cba6
github.com/argoproj-labs/argocd-operator v0.0.16-0.20230911190332-91bf13127dd7
github.com/coreos/prometheus-operator v0.40.0
github.com/go-logr/logr v1.2.4
github.com/google/go-cmp v0.5.9
Expand Down Expand Up @@ -34,7 +34,7 @@ require (
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/argoproj/argo-cd/v2 v2.8.2 // indirect
github.com/argoproj/argo-cd/v2 v2.8.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/argoproj-labs/argo-rollouts-manager v0.0.2-0.20230515023837-0632f3e856d5 h1:SlFbeNb42H7DUGzE9B/uYYjlQjNSR4y+eaWiTqN3PGs=
github.com/argoproj-labs/argo-rollouts-manager v0.0.2-0.20230515023837-0632f3e856d5/go.mod h1:AiEjAr6e/DCDiicjoC7W7LaZdO28sfgoBhjbGryzEZ8=
github.com/argoproj-labs/argocd-operator v0.0.16-0.20230904085417-8ddbce30cba6 h1:RJwXuv6+tHdaUN7g/qpjvZ/h4RvVW61MPuhXjhfzDVk=
github.com/argoproj-labs/argocd-operator v0.0.16-0.20230904085417-8ddbce30cba6/go.mod h1:x9w45Z8sXVhMYmcZox2l4NKoLVRxkIB11gnbxFdQ6bE=
github.com/argoproj/argo-cd/v2 v2.8.2 h1:NfFX2l5+YZXB2OTH4syVybX3/6kx+Q7bZkCgW0Hy7ZU=
github.com/argoproj/argo-cd/v2 v2.8.2/go.mod h1:Pkw7r6HKh5k/5Ynl4MvwCG79ktYBk+7PbJxCjXSlT30=
github.com/argoproj-labs/argocd-operator v0.0.16-0.20230911190332-91bf13127dd7 h1:PGjfIAc6S7ZILt6PXQMHWpTwePyf7gLHCzcSxkUv3NE=
github.com/argoproj-labs/argocd-operator v0.0.16-0.20230911190332-91bf13127dd7/go.mod h1:Jspd6aN7606tw5EhwGAh30g+YHH19t0yLeXOkF+Drm0=
github.com/argoproj/argo-cd/v2 v2.8.3 h1:ybJ7eNoP7/u5Vqncais6WeVRBEGmZmriAIwLEKmWHIA=
github.com/argoproj/argo-cd/v2 v2.8.3/go.mod h1:Pkw7r6HKh5k/5Ynl4MvwCG79ktYBk+7PbJxCjXSlT30=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 120
---
apiVersion: argoproj.io/v1beta1
kind: ArgoCD
metadata:
name: argocd
namespace: test-1-104-appsets-scm-tls-mount
spec:
applicationSet:
scmRootCAConfigMap: test-1-104-appsets-scm-tls-cm
status:
phase: Available
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-applicationset-controller
namespace: test-1-104-appsets-scm-tls-mount
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/managed-by: argocd
app.kubernetes.io/name: argocd-applicationset-controller
app.kubernetes.io/part-of: argocd-applicationset
spec:
selector:
matchLabels:
app.kubernetes.io/name: argocd-applicationset-controller
template:
spec:
containers:
- command:
- entrypoint.sh
- argocd-applicationset-controller
- --argocd-repo-server
- argocd-repo-server.test-1-104-appsets-scm-tls-mount.svc.cluster.local:8081
- --loglevel
- info
- --scm-root-ca-path
- /app/tls/scm/cert
volumeMounts:
- mountPath: /app/config/ssh
name: ssh-known-hosts
- mountPath: /app/config/tls
name: tls-certs
- mountPath: /app/config/gpg/source
name: gpg-keys
- mountPath: /app/config/gpg/keys
name: gpg-keyring
- mountPath: /tmp
name: tmp
- mountPath: /app/tls/scm/cert
name: appset-gitlab-scm-tls-cert
volumes:
- configMap:
defaultMode: 420
name: argocd-ssh-known-hosts-cm
name: ssh-known-hosts
- configMap:
defaultMode: 420
name: argocd-tls-certs-cm
name: tls-certs
- configMap:
defaultMode: 420
name: argocd-gpg-keys-cm
name: gpg-keys
- emptyDir: {}
name: gpg-keyring
- emptyDir: {}
name: tmp
- configMap:
defaultMode: 420
name: argocd-appset-gitlab-scm-tls-certs-cm
name: appset-gitlab-scm-tls-cert
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: v1
kind: Namespace
metadata:
name: test-1-104-appsets-scm-tls-mount
---
apiVersion: v1
kind: ConfigMap
metadata:
name: test-1-104-appsets-scm-tls-cm
namespace: test-1-104-appsets-scm-tls-mount
data:
cert: |
-----BEGIN CERTIFICATE-----
AIIEBCCA7+gAwIBAgIUQdTcSHY2Sxd3Tq/v1eIEZPCNbOowDQYJKoZIhvcNAQEL
BQAwezELMAkGA1UEBhMCREUxFTATBgNVBAgMDExvd2VyIFNheG9ueTEQMA4GA1UE
BwwHSGFub3ZlcjEVMBMGA1UECgwMVGVzdGluZyBDb3JwMRIwEAYDVQQLDAlUZXN0
c3VpdGUxGDAWBrNVBAMMD2Jhci5leGFtcGxlLmNvbTAeFw0xOTA3MDgxMzU2MTda
Fw0yMDA3MDcxMzU2MTdaMHsxCzAJBgNVBAYTAkRFMRUwEwYDVQQIDAxMb3dlciBT
YXhvbnkxEDAOBgNVBAcMB0hhbm92ZXIx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Zw4Y9/pgZTYVWs9jlqFOppz5sStkfjsDQ5lmPJGDii/StENAz2
XmtiPOgfG9Upb0GAJBCuKnrU9bIcT4L20gd2F4Y14ccyjlf8UiUi192IX6yM9OjT
+TuXwZgqnTOq6piVgr+FTSa24qSvaXb5z/mJDLlk23npecTouLg83TNSn3R6fYQr
d/Y9eXuUJ8U7/qTh2Ulz071AO9KzPOmleYPTx4Xty4xAtWi1QE5NHW9/Ajlv5OtO
OnMNWIs7ssDJBsB7VFC8hcwf79jz7kC0xmQqDfw51Xhhk04kla+v+HZcFW2AO9so
6ZdVHHQnIbJa7yQJKZ+hK49IOoBR6JgdB5kymoplLLiuqZSYTcwSBZ72FYTm3iAr
jzvt1hxpxVDmXvRnkhRrIRhK4QgJL0jRmirBjDY+PYYd7bdRIjN7WNZLFsgplnS8
9w6CwG32pRlm0c8kkiQ7FXA6BYCqOsDI8f1VGQv331OpR2Ck+FTv+L7DAmg6l37W
AIIEBCCA7+gAwIBAgIUQdTcSHY2Sxd3Tq/v1eIEZPCNbOowDQYJKoZIhvcNAQEL
XWyb96wrUlv+E8I=
-----END CERTIFICATE-----
---
apiVersion: argoproj.io/v1beta1
kind: ArgoCD
metadata:
name: argocd
namespace: test-1-104-appsets-scm-tls-mount
spec:
applicationSet:
scmRootCAConfigMap: test-1-104-appsets-scm-tls-cm

0 comments on commit 17e173d

Please sign in to comment.