Skip to content

Commit

Permalink
Merge pull request #298 from mbaldessari/quick-fixes
Browse files Browse the repository at this point in the history
A bunch of fixes
  • Loading branch information
mbaldessari authored Nov 14, 2024
2 parents 9803552 + c207e34 commit 065b180
Show file tree
Hide file tree
Showing 18 changed files with 64 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ spec:
timeoutSeconds: 1
envFrom:
- secretRef:
name: gitea-admin-secret
name: gitea-admin-secret-and-branch
- secretRef:
name: aws-connection-user-bucket
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: ImageStream
metadata:
name: messaging
spec:
lookupPolicy:
local: true
tags:
- name: {{ .Values.iot_consumer.bootstrap_tag }}
from:
Expand Down
41 changes: 35 additions & 6 deletions charts/datacenter/pipelines/templates/gitea-admin-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@ spec:
secret:
name: gitea-admin-secret
updatePolicy: Replace
{{- range $i := list "manuela-ci" "ml-development" }}
---
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
name: gitea-admin-external-secret
namespace: {{ $i }}
namespace: manuela-ci
spec:
refreshInterval: 15s
secretStoreRef:
Expand Down Expand Up @@ -69,9 +68,39 @@ spec:
remoteRef:
key: "pushsecrets/gitea_admin"
property: "password"
{{- end }}{{/* range $i := list manuela-ci ml-development */}}
---
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
name: gitea-admin-external-secret
namespace: ml-development
spec:
refreshInterval: 15s
secretStoreRef:
name: {{ $.Values.secretStore.name }}
kind: {{ $.Values.secretStore.kind }}
target:
name: gitea-admin-secret-and-branch
template:
metadata:
annotations:
# Tekton magic, see https://tekton.dev/vault/pipelines-v0.15.2/auth/
tekton.dev/git-0: {{ $full_giturl }}
type: Opaque
engineVersion: v2
data:
username: "{{ `{{ .gitea_admin_user }}` }}"
password: "{{ `{{ .gitea_admin_password }}` }}"
branch: {{ $.Values.global.targetRevision }}
data:
- secretKey: gitea_admin_user
remoteRef:
key: "pushsecrets/gitea_admin"
property: "username"

- secretKey: gitea_admin_password
remoteRef:
key: "pushsecrets/gitea_admin"
property: "password"
{{- end }}
{{- end }}

# TODO: We used to have a branch field we need to circle back and expose that differently
# branch:
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all

- name: argocd-sync-application
taskRef:
Expand All @@ -179,8 +181,6 @@ spec:
value: manuela-test
- name: flags
value: --insecure
- name: argocd-version
value: "v1.5.2"
- name: revision
value: $(params.OPS_REVISION)
- name: argocd-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all

- name: argocd-sync-application
taskRef:
Expand All @@ -180,8 +182,6 @@ spec:
value: manuela-test
- name: flags
value: --insecure
- name: argocd-version
value: "v1.5.2"
- name: revision
value: $(params.OPS_REVISION)
- name: argocd-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all

- name: argocd-sync-application
taskRef:
Expand All @@ -273,8 +275,6 @@ spec:
value: manuela-test
- name: flags
value: --insecure
- name: argocd-version
value: "v1.5.2"
- name: revision
value: $(params.OPS_REVISION)
- name: argocd-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,5 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,5 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,5 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,5 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all
2 changes: 0 additions & 2 deletions charts/datacenter/pipelines/templates/pipelines/just-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ spec:
value: manuela-test
- name: flags
value: --insecure
- name: argocd-version
value: "v1.5.2"
- name: revision
value: $(params.OPS_REVISION)
- name: argocd-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,5 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,5 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,5 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,5 @@ spec:
params:
- name: subdirectory
value: ops
- name: PUSH_FLAGS
value: --all
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ spec:
default: --
- name: argocd-version
type: string
default: v1.5.2
default: v1.14.1
- name: argocd-server
type: string
default: openshift-gitops-server.openshift-gitops.svc
steps:
- name: login-sync-wait
image: argoproj/argocd:$(params.argocd-version)
image: registry.redhat.io/openshift-gitops-1/argocd-rhel8:$(params.argocd-version)
command: ["/bin/bash", "-c"]
args:
- if [ -z $ARGOCD_AUTH_TOKEN ]; then
Expand Down
3 changes: 1 addition & 2 deletions charts/datacenter/pipelines/templates/tasks/github-push.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{{- $giturl := coalesce .Values.global.git.hostname (printf "gitea-route-vp-gitea.%s" .Values.global.localClusterDomain) }}
{{- $full_giturl := printf "https://%s/%s/manuela-dev.git" $giturl .Values.global.git.account }}
---
apiVersion: tekton.dev/v1beta1
kind: Task
Expand All @@ -24,6 +22,7 @@ spec:
- name: push
image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.44.5
script: |
set -x
git remote -v
git branch
git branch -r | grep -q origin/$(git rev-parse --abbrev-ref HEAD) && git -c http.sslVerify=$(params.sslVerify) pull --ff-only --no-edit
Expand Down
2 changes: 1 addition & 1 deletion values-global.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ global:
installPlanApproval: Automatic

imageregistry:
account: rhn_support_mbaldess
account: PLAINTEXT
hostname: quay.io
type: quay

Expand Down

0 comments on commit 065b180

Please sign in to comment.