diff --git a/installer/charts/rhtap-gitops/templates/NOTES.txt b/installer/charts/rhtap-gitops/templates/NOTES.txt index 8625bbdc..e3e5b403 100644 --- a/installer/charts/rhtap-gitops/templates/NOTES.txt +++ b/installer/charts/rhtap-gitops/templates/NOTES.txt @@ -5,6 +5,6 @@ ArgoCD: Namespace: {{ $argoCD.namespace }} Server URL: https://{{ include "argoCD.serverHostname" . }} Admin Secret: {{ include "argoCD.secretClusterName" . }} - Integration Secret: {{ $argoCD.secretName }} + Integration Secret: {{ $argoCD.integrationSecret.name }} {{ end -}} \ No newline at end of file diff --git a/installer/charts/rhtap-gitops/values.yaml b/installer/charts/rhtap-gitops/values.yaml index 45c29cc8..3bfdfa36 100644 --- a/installer/charts/rhtap-gitops/values.yaml +++ b/installer/charts/rhtap-gitops/values.yaml @@ -12,6 +12,7 @@ argoCD: # The secret namespace to store the ArgoCD API credentials, this secret is later on # used for integration with other services. integrationSecret: + name: __OVERWRITE_ME__ namespace: __OVERWRITE_ME__ # Route configuration for all ArgoCD components. route: diff --git a/installer/charts/rhtap-integrations/templates/gitops/bitbucket-auth-secret.yaml b/installer/charts/rhtap-integrations/templates/gitops/bitbucket-auth-secret.yaml deleted file mode 100644 index 41785495..00000000 --- a/installer/charts/rhtap-integrations/templates/gitops/bitbucket-auth-secret.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{ $namespace := .Release.Namespace }} -{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "rhtap-bitbucket-integration") -}} -{{- $secretData := (get $secretObj "data") | default dict -}} -{{- if $secretData -}} -apiVersion: v1 -data: - password: {{ $secretData.appPassword }} - type: {{ "git" | b64enc }} - url: {{ print "https://" ($secretData.host | b64dec) | b64enc }} - username: {{ $secretData.username }} -kind: Secret -metadata: - labels: - argocd.argoproj.io/secret-type: repo-creds - name: bitbucket-auth-secret - namespace: {{ $namespace }} -type: Opaque -{{- end }} \ No newline at end of file diff --git a/installer/charts/rhtap-integrations/templates/gitops/bitbucket-auth.yaml b/installer/charts/rhtap-integrations/templates/gitops/bitbucket-auth.yaml new file mode 100644 index 00000000..a5516195 --- /dev/null +++ b/installer/charts/rhtap-integrations/templates/gitops/bitbucket-auth.yaml @@ -0,0 +1,20 @@ +{{- if .Values.argoCD.enabled -}} + {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "rhtap-bitbucket-integration") -}} + {{- $secretData := (get $secretObj "data") | default dict -}} + {{- if $secretData -}} +apiVersion: v1 +data: + password: {{ $secretData.appPassword }} + username: {{ $secretData.username }} +kind: Secret +metadata: + labels: + argocd.argoproj.io/secret-type: repo-creds + name: bitbucket-auth-secret + namespace: {{ .Values.argoCD.namespace }} +stringData: + type: git + url: https://{{ $secretData.host | b64dec }} +type: Opaque + {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/installer/charts/rhtap-integrations/templates/gitops/github-auth.yaml b/installer/charts/rhtap-integrations/templates/gitops/github-auth.yaml new file mode 100644 index 00000000..ceea8065 --- /dev/null +++ b/installer/charts/rhtap-integrations/templates/gitops/github-auth.yaml @@ -0,0 +1,20 @@ +{{- if .Values.argoCD.enabled -}} + {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "rhtap-github-integration") -}} + {{- $secretData := (get $secretObj "data") | default dict -}} + {{- if $secretData -}} +apiVersion: v1 +data: + password: {{ $secretData.token }} +kind: Secret +metadata: + labels: + argocd.argoproj.io/secret-type: repo-creds + name: github-auth-secret + namespace: {{ .Values.argoCD.namespace }} +stringData: + type: git + url: https://{{ $secretData.host | b64dec }} + username: "oauth2" +type: Opaque + {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/installer/charts/rhtap-integrations/templates/gitops/gitlab-auth-secret.yaml b/installer/charts/rhtap-integrations/templates/gitops/gitlab-auth-secret.yaml deleted file mode 100644 index 591bbc06..00000000 --- a/installer/charts/rhtap-integrations/templates/gitops/gitlab-auth-secret.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{ $namespace := .Release.Namespace }} -{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "rhtap-gitlab-integration") -}} -{{- $secretData := (get $secretObj "data") | default dict -}} -{{- if $secretData -}} -apiVersion: v1 -data: - password: {{ $secretData.token }} - type: {{ "git" | b64enc }} - url: {{ print "https://" ($secretData.host | b64dec) | b64enc }} - username: {{ "oauth2" | b64enc }} -kind: Secret -metadata: - labels: - argocd.argoproj.io/secret-type: repo-creds - name: gitlab-auth-secret - namespace: {{ $namespace }} -type: Opaque -{{- end }} \ No newline at end of file diff --git a/installer/charts/rhtap-integrations/templates/gitops/gitlab-auth.yaml b/installer/charts/rhtap-integrations/templates/gitops/gitlab-auth.yaml new file mode 100644 index 00000000..5386b846 --- /dev/null +++ b/installer/charts/rhtap-integrations/templates/gitops/gitlab-auth.yaml @@ -0,0 +1,20 @@ +{{- if .Values.argoCD.enabled -}} + {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "rhtap-gitlab-integration") -}} + {{- $secretData := (get $secretObj "data") | default dict -}} + {{- if $secretData -}} +apiVersion: v1 +data: + password: {{ $secretData.token }} +kind: Secret +metadata: + labels: + argocd.argoproj.io/secret-type: repo-creds + name: gitlab-auth-secret + namespace: {{ .Values.argoCD.namespace }} +stringData: + type: git + url: https://{{ $secretData.host | b64dec }} + username: "oauth2" +type: Opaque + {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/installer/charts/rhtap-integrations/values.yaml b/installer/charts/rhtap-integrations/values.yaml index d3fbd244..46bbe348 100644 --- a/installer/charts/rhtap-integrations/values.yaml +++ b/installer/charts/rhtap-integrations/values.yaml @@ -1,6 +1,9 @@ --- integrations: acs: - enabled: true + enabled: __OVERWRITE_ME__ + argoCD: + enabled: __OVERWRITE_ME__ + namespace: __OVERWRITE_ME__ quay: - enabled: true + enabled: __OVERWRITE_ME__ diff --git a/installer/charts/values.yaml.tpl b/installer/charts/values.yaml.tpl index 09b56590..49233611 100644 --- a/installer/charts/values.yaml.tpl +++ b/installer/charts/values.yaml.tpl @@ -263,6 +263,9 @@ quay: integrations: acs: enabled: {{ $acs.Enabled }} + argoCD: + enabled: {{ $gitops.enabled }} + namespace: {{ $gitops.Namespace }} quay: enabled: {{ $quay.Enabled }} # github: