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

fix: gitops SCM authentication #461

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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__
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Alternatively we could make boolean fields false by default.

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