Skip to content

Commit 68805d0

Browse files
committed
Fix tekton results storage configurations
1 parent 6ca17bf commit 68805d0

File tree

20 files changed

+221
-263
lines changed

20 files changed

+221
-263
lines changed

developer/openshift/dev_setup.sh

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ install_pipeline_service() {
234234
TEKTON_RESULTS_DATABASE_PASSWORD="$(yq '.tekton_results_db.password' "$CONFIG")"
235235
export TEKTON_RESULTS_DATABASE_USER
236236
export TEKTON_RESULTS_DATABASE_PASSWORD
237-
TEKTON_RESULTS_S3_USER="$(yq '.tekton_results_s3.user // "minio"' "$CONFIG")"
237+
TEKTON_RESULTS_S3_USER="$(yq '.tekton_results_s3.user // "tekton"' "$CONFIG")"
238238
TEKTON_RESULTS_S3_PASSWORD="$(yq ".tekton_results_s3.password // \"$(openssl rand -base64 20)\"" "$CONFIG")"
239239
export TEKTON_RESULTS_S3_USER
240240
export TEKTON_RESULTS_S3_PASSWORD
@@ -251,17 +251,14 @@ install_pipeline_service() {
251251
for app in "pipeline-service" "pipeline-service-storage" "pipeline-service-o11y"; do
252252
cat << EOF >"$manifest_dir/patch-$app.yaml"
253253
---
254-
apiVersion: argoproj.io/v1alpha1
255-
kind: Application
256-
metadata:
257-
name: $app
258-
namespace: openshift-gitops
259-
spec:
260-
source:
261-
repoURL: $GIT_URL
262-
targetRevision: $GIT_REF
254+
- op: replace
255+
path: "/spec/sources/0/repoURL"
256+
value: $GIT_URL
257+
- op: replace
258+
path: "/spec/sources/0/targetRevision"
259+
value: $GIT_REF
263260
EOF
264-
yq -i ".patches += [{\"path\": \"patch-$app.yaml\"}]" "$manifest_dir/kustomization.yaml"
261+
yq -i ".patches += [{\"path\": \"patch-$app.yaml\", \"target\": {\"kind\": \"Application\", \"namespace\": \"openshift-gitops\", \"name\": \"$app\" }}]" "$manifest_dir/kustomization.yaml"
265262
done
266263

267264
#############################################################################

developer/openshift/gitops/argocd/kustomization.yaml

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

55
resources:
66
- pipeline-service.yaml
7-
- pipeline-service-storage.yaml
87
- pipeline-service-o11y.yaml
8+
- pipeline-service-storage

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ spec:
1010
destination:
1111
namespace: openshift-gitops
1212
server: https://kubernetes.default.svc
13-
source:
14-
path: developer/openshift/gitops/argocd/pipeline-service-o11y
15-
repoURL: https://github.com/openshift-pipelines/pipeline-service.git
16-
targetRevision: main
13+
sources:
14+
- path: developer/openshift/gitops/argocd/pipeline-service-o11y
15+
repoURL: https://github.com/openshift-pipelines/pipeline-service.git
16+
targetRevision: main
1717
project: default
1818
syncPolicy:
1919
# Comment this out if you want to manually trigger deployments (using the

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44

55
resources:
6-
- postgres.yaml
7-
- minio
6+
- pipeline-service-storage.yaml

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

Lines changed: 16 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: minio.min.io/v2
33
kind: Tenant
44
metadata:
5-
name: storage
5+
name: minio
66
namespace: tekton-results
77
labels:
88
app: minio
@@ -13,60 +13,35 @@ metadata:
1313
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
1414
argocd.argoproj.io/sync-wave: "0"
1515
spec:
16+
image: quay.io/minio/minio:latest
17+
requestAutoCert: false
18+
podManagementPolicy: Parallel
19+
configuration:
20+
name: minio-configuration
1621
exposeServices:
1722
minio: true
1823
features:
1924
bucketDNS: false
20-
domains: {}
21-
# This desired part doesn't work. Issues:
22-
# https://github.com/minio/operator/issues/1345
23-
# https://github.com/minio/operator/issues/1346
24-
# users:
25-
# - name: storage-user
26-
# buckets:
27-
# - name: "tekton-results"
28-
# region: "us-east-1"
29-
# objectLock: true
30-
certConfig: {}
31-
podManagementPolicy: Parallel
32-
configuration:
33-
name: minio-storage-configuration
34-
env: []
35-
serviceMetadata:
36-
minioServiceLabels: {}
37-
minioServiceAnnotations: {}
38-
consoleServiceLabels: {}
39-
consoleServiceAnnotations: {}
40-
priorityClassName: ""
41-
externalCaCertSecret: []
42-
externalCertSecret: []
43-
externalClientCertSecrets: []
44-
image: quay.io/minio/minio:RELEASE.2022-09-17T00-09-45Z
45-
imagePullSecret: {}
46-
mountPath: /export
47-
subPath: ""
25+
users:
26+
- name: minio-user
27+
buckets:
28+
- name: tekton-results
29+
region: not-applicable
30+
objectLock: true
4831
pools:
4932
- servers: 1
5033
name: pool-0
5134
volumesPerServer: 2
52-
nodeSelector: {}
53-
tolerations: []
54-
affinity:
55-
nodeAffinity: {}
56-
podAffinity: {}
57-
podAntiAffinity: {}
58-
resources: {}
5935
volumeClaimTemplate:
6036
apiVersion: v1
6137
kind: persistentvolumeclaims
62-
metadata: {}
6338
spec:
6439
accessModes:
6540
- ReadWriteOnce
6641
resources:
6742
requests:
6843
storage: 1Gi
69-
status: {}
70-
securityContext: {}
71-
containerSecurityContext: {}
72-
requestAutoCert: true
44+
securityContext:
45+
runAsNonRoot: true
46+
containerSecurityContext:
47+
runAsNonRoot: true

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ metadata:
88
argocd.argoproj.io/sync-wave: "0"
99
spec:
1010
destination:
11-
namespace: openshift-gitops
11+
namespace: tekton-results
1212
server: https://kubernetes.default.svc
13-
source:
14-
path: developer/openshift/gitops/argocd/pipeline-service-storage
15-
repoURL: https://github.com/openshift-pipelines/pipeline-service.git
16-
targetRevision: main
13+
sources:
14+
- repoURL: https://github.com/openshift-pipelines/pipeline-service.git
15+
path: developer/openshift/gitops/argocd/pipeline-service-storage/minio
16+
targetRevision: main
17+
ref: values
18+
- repoURL: https://charts.bitnami.com/bitnami
19+
chart: postgresql
20+
targetRevision: 12.2.7
21+
helm:
22+
releaseName: postgres
23+
valueFiles:
24+
- $values/developer/openshift/gitops/argocd/pipeline-service-storage/postgres/values.yaml
1725
project: default
1826
syncPolicy:
1927
# Comment this out if you want to manually trigger deployments (using the

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

Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
image:
3+
tag: 13.10.0
4+
5+
tls:
6+
enabled: true
7+
autoGenerated: true
8+
9+
auth:
10+
database: tekton_results
11+
username: tekton
12+
existingSecret: tekton-results-database
13+
secretKeys:
14+
userPasswordKey: db.password
15+
adminPasswordKey: db.password
16+
17+
primary:
18+
resources:
19+
requests: null
20+
podSecurityContext:
21+
fsGroup: null
22+
seccompProfile:
23+
type: RuntimeDefault
24+
containerSecurityContext:
25+
allowPrivilegeEscalation: false
26+
runAsNonRoot: true
27+
runAsUser: null
28+
seccompProfile:
29+
type: RuntimeDefault
30+
capabilities:
31+
drop:
32+
- ALL
33+
34+
volumePermissions:
35+
enabled: false
36+
37+
shmVolume:
38+
enabled: false

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ metadata:
88
argocd.argoproj.io/sync-wave: "0"
99
spec:
1010
destination:
11-
namespace: openshift-gitops
11+
namespace: pipeline-service
1212
server: https://kubernetes.default.svc
13-
source:
14-
path: developer/openshift/gitops/argocd/pipeline-service
15-
repoURL: https://github.com/openshift-pipelines/pipeline-service.git
16-
targetRevision: main
13+
sources:
14+
- path: developer/openshift/gitops/argocd/pipeline-service
15+
repoURL: https://github.com/openshift-pipelines/pipeline-service.git
16+
targetRevision: main
1717
project: default
1818
syncPolicy:
1919
# Comment this out if you want to manually trigger deployments (using the

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ kind: Kustomization
55
resources:
66
- ../../../../../operator/gitops/argocd/pipeline-service
77

8-
patches:
9-
- path: tekton-results/minio-create-bucket.yaml
10-
- path: tekton-results/minio-tls.yaml
8+
# patches:
9+
# - path: tekton-results/minio-tls.yaml
1110

1211
# Skip applying the Tekton operands while the Tekton operator is being installed.
1312
# See more information about this option, here:

0 commit comments

Comments
 (0)