Skip to content

Commit 19f250c

Browse files
Mo3m3nRoming22
authored andcommitted
Fix pipeline-service-storage application
- Fix kustomization usage in pipeline-service-storage application - Fix setup of minio's config secret
1 parent a4d8334 commit 19f250c

File tree

8 files changed

+38
-20
lines changed

8 files changed

+38
-20
lines changed

developer/openshift/gitops/argocd/pipeline-service-storage.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ spec:
2222
selfHeal: true
2323
syncOptions:
2424
- CreateNamespace=true
25+
# workaround to make working both minio: newer and old 4.5.4
26+
- Validate=false
2527
retry:
2628
limit: -1 # number of failed sync attempt retries; unlimited number of attempts if less than 0
2729
backoff:

developer/openshift/gitops/argocd/pipeline-service-storage/kustomization.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ kind: Kustomization
44

55
resources:
66
- postgres
7-
- minio/operator
8-
- minio/tenant
7+
- minio
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
resources:
6+
- operator
7+
- tenant
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
resources:
6+
- db-service.yaml
7+
- db-statefulset.yaml

developer/openshift/gitops/argocd/pipeline-service/tekton-results/minio-tls-patch.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ spec:
1414
valueFrom:
1515
secretKeyRef:
1616
key: S3_ACCESS_KEY_ID
17-
name: s3-credentials
17+
name: tekton-results-s3
1818
- name: S3_SECRET_ACCESS_KEY
1919
valueFrom:
2020
secretKeyRef:
2121
key: S3_SECRET_ACCESS_KEY
22-
name: s3-credentials
22+
name: tekton-results-s3

developer/openshift/gitops/argocd/pipeline-service/tekton-results/s3-configuration-patch.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ spec:
5252
valueFrom:
5353
secretKeyRef:
5454
key: S3_ACCESS_KEY_ID
55-
name: s3-credentials
55+
name: tekton-results-s3
5656
- name: S3_SECRET_ACCESS_KEY
5757
valueFrom:
5858
secretKeyRef:
5959
key: S3_SECRET_ACCESS_KEY
60-
name: s3-credentials
60+
name: tekton-results-s3
6161
- name: S3_BUCKET_NAME
6262
value: tekton-results
6363
- name: S3_ENDPOINT

developer/openshift/gitops/argocd/pipeline-service/tekton-results/templates/minio-storage-configuration.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

operator/images/access-setup/content/bin/setup_work_dir.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ tekton_results_manifest(){
176176
results_namespace="$manifests_dir/compute/tekton-results/namespace.yaml"
177177
results_db_secret="$manifests_dir/compute/tekton-results/tekton-results-db-secret.yaml"
178178
results_s3_secret="$manifests_dir/compute/tekton-results/tekton-results-s3-secret.yaml"
179+
results_minio_config="$manifests_dir/compute/tekton-results/tekton-results-minio-config.yaml"
179180
if [ ! -e "$results_kustomize" ]; then
180181
results_dir="$(dirname "$results_kustomize")"
181182
mkdir -p "$results_dir"
@@ -206,7 +207,22 @@ tekton_results_manifest(){
206207
--from-literal=S3_SECRET_ACCESS_KEY="$TEKTON_RESULTS_S3_PASSWORD" \
207208
-n tekton-results --dry-run=client -o yaml > "$results_s3_secret"
208209

209-
yq e -n '.resources += ["namespace.yaml", "tekton-results-secret.yaml", "tekton_results_s3.yaml"]' > "$results_kustomize"
210+
cat <<EOF | kubectl apply -f - --dry-run=client -o yaml > "$results_minio_config"
211+
apiVersion: v1
212+
kind: Secret
213+
metadata:
214+
name: minio-storage-configuration
215+
namespace: tekton-results
216+
type: Opaque
217+
stringData:
218+
config.env: |-
219+
export MINIO_ROOT_USER="$TEKTON_RESULTS_S3_USER"
220+
export MINIO_ROOT_PASSWORD="$TEKTON_RESULTS_S3_PASSWORD"
221+
export MINIO_STORAGE_CLASS_STANDARD="EC:2"
222+
export MINIO_BROWSER="on"
223+
EOF
224+
225+
yq e -n '.resources += ["namespace.yaml", "tekton-results-db-secret.yaml", "tekton-results-s3-secret.yaml", "tekton-results-minio-config.yaml"]' > "$results_kustomize"
210226
if [ "$(yq ".data" < "$results_db_secret" | grep -cE "db.host|db.name|db.user|db.password")" != "4" ]; then
211227
printf "[ERROR] Invalid manifest: '%s'" "$results_db_secret" >&2
212228
exit 1

0 commit comments

Comments
 (0)