diff --git a/operator/gitops/argocd/pipeline-service/tekton-results/api-migrator-config.yaml b/operator/gitops/argocd/pipeline-service/tekton-results/api-migrator-config.yaml new file mode 100644 index 000000000..557632710 --- /dev/null +++ b/operator/gitops/argocd/pipeline-service/tekton-results/api-migrator-config.yaml @@ -0,0 +1,44 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: tekton-results-api + annotations: + argocd.argoproj.io/sync-wave: "0" +spec: + template: + spec: + initContainers: + - name: migrator + env: + - name: DB_USER + valueFrom: + secretKeyRef: + name: tekton-results-database + key: db.user + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: tekton-results-database + key: db.password + - name: DB_HOST + value: + valueFrom: + secretKeyRef: + name: tekton-results-database + key: db.host + - name: DB_NAME + value: + valueFrom: + secretKeyRef: + name: tekton-results-database + key: db.name + resources: + requests: + cpu: 5m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + securityContext: + readOnlyRootFilesystem: true diff --git a/operator/gitops/argocd/pipeline-service/tekton-results/kustomization.yaml b/operator/gitops/argocd/pipeline-service/tekton-results/kustomization.yaml index 6bb38b035..80498f412 100644 --- a/operator/gitops/argocd/pipeline-service/tekton-results/kustomization.yaml +++ b/operator/gitops/argocd/pipeline-service/tekton-results/kustomization.yaml @@ -3,7 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: tekton-results resources: - - https://github.com/openshift-pipelines/tektoncd-results.git/config/overlays/base-only/?ref=a602fb3e858f6a3195374d2175053db7e5db9f77 + - https://github.com/openshift-pipelines/tektoncd-results.git/config/overlays/base-only/?ref=1c5b3054ffb52f172fda31587d7dfd88a9724c8f - namespace.yaml - api-route.yaml - watcher-logging-rbac.yaml @@ -13,10 +13,13 @@ resources: images: - name: ko://github.com/tektoncd/results/cmd/api newName: quay.io/redhat-appstudio/tekton-results-api - newTag: a602fb3e858f6a3195374d2175053db7e5db9f77 + newTag: 1c5b3054ffb52f172fda31587d7dfd88a9724c8f - name: ko://github.com/tektoncd/results/cmd/watcher newName: quay.io/redhat-appstudio/tekton-results-watcher - newTag: a602fb3e858f6a3195374d2175053db7e5db9f77 + newTag: 1c5b3054ffb52f172fda31587d7dfd88a9724c8f + - name: ko://github.com/tektoncd/results/tools/migrator + newName: quay.io/redhat-appstudio/tekton-results-migrator + newTag: 1c5b3054ffb52f172fda31587d7dfd88a9724c8f # generate a new configmap with updated values (logs api, db ssl mode) and replace the default one configMapGenerator: @@ -29,6 +32,7 @@ configMapGenerator: patches: - path: api-db-config.yaml + - path: api-migrator-config.yaml - path: api-s3-config.yaml - path: api-sync.yaml - path: api-service-sync.yaml