Skip to content

Commit a83c777

Browse files
committed
Fix tekton results storage configurations
1 parent a9b8b59 commit a83c777

File tree

19 files changed

+159
-250
lines changed

19 files changed

+159
-250
lines changed

developer/openshift/dev_setup.sh

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ install_pipeline_service() {
227227
TEKTON_RESULTS_DATABASE_PASSWORD="$(yq '.tekton_results_db.password' "$CONFIG")"
228228
export TEKTON_RESULTS_DATABASE_USER
229229
export TEKTON_RESULTS_DATABASE_PASSWORD
230-
TEKTON_RESULTS_S3_USER="$(yq '.tekton_results_s3.user // "minio"' "$CONFIG")"
230+
TEKTON_RESULTS_S3_USER="$(yq '.tekton_results_s3.user // "tekton"' "$CONFIG")"
231231
TEKTON_RESULTS_S3_PASSWORD="$(yq ".tekton_results_s3.password // \"$(openssl rand -base64 20)\"" "$CONFIG")"
232232
export TEKTON_RESULTS_S3_USER
233233
export TEKTON_RESULTS_S3_PASSWORD
@@ -244,17 +244,14 @@ install_pipeline_service() {
244244
for app in "pipeline-service" "pipeline-service-storage" "pipeline-service-o11y"; do
245245
cat << EOF >"$manifest_dir/patch-$app.yaml"
246246
---
247-
apiVersion: argoproj.io/v1alpha1
248-
kind: Application
249-
metadata:
250-
name: $app
251-
namespace: openshift-gitops
252-
spec:
253-
source:
254-
repoURL: $GIT_URL
255-
targetRevision: $GIT_REF
247+
- op: replace
248+
path: "/spec/sources/0/repoURL"
249+
value: $GIT_URL
250+
- op: replace
251+
path: "/spec/sources/0/targetRevision"
252+
value: $GIT_REF
256253
EOF
257-
yq -i ".patches += [{\"path\": \"patch-$app.yaml\"}]" "$manifest_dir/kustomization.yaml"
254+
yq -i ".patches += [{\"path\": \"patch-$app.yaml\", \"target\": {\"kind\": \"Application\", \"namespace\": \"openshift-gitops\", \"name\": \"$app\" }}]" "$manifest_dir/kustomization.yaml"
258255
done
259256

260257
#############################################################################

developer/openshift/gitops/argocd/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/kustomization.yaml

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
apiVersion: kustomize.config.k8s.io/v1beta1
3-
kind: Kustomization
2+
apiVersion: kustomize.config.k8s.io/v1alpha1
3+
kind: Component
44

55
resources:
66
- operator

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/postgres.yaml

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

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ resources:
55
- ../../../../../../operator/gitops/argocd/pipeline-service/tekton-results
66

77
patches:
8-
- path: minio-create-bucket.yaml
98
- path: minio-tls.yaml

0 commit comments

Comments
 (0)