Skip to content

Commit

Permalink
fix: gitops SCM authentication
Browse files Browse the repository at this point in the history
This was broken with 44728b5

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
  • Loading branch information
Roming22 committed Feb 12, 2025
1 parent 44728b5 commit cc314c9
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 39 deletions.
2 changes: 1 addition & 1 deletion installer/charts/rhtap-gitops/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
1 change: 1 addition & 0 deletions installer/charts/rhtap-gitops/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 -}}
Original file line number Diff line number Diff line change
@@ -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 -}}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 -}}
7 changes: 5 additions & 2 deletions installer/charts/rhtap-integrations/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
integrations:
acs:
enabled: true
enabled: __OVERWRITE_ME__
argoCD:
enabled: __OVERWRITE_ME__
namespace: __OVERWRITE_ME__
quay:
enabled: true
enabled: __OVERWRITE_ME__
3 changes: 3 additions & 0 deletions installer/charts/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ quay:
integrations:
acs:
enabled: {{ $acs.Enabled }}
argoCD:
enabled: {{ $gitops.enabled }}
namespace: {{ $gitops.Namespace }}
quay:
enabled: {{ $quay.Enabled }}
# github:
Expand Down

0 comments on commit cc314c9

Please sign in to comment.