Skip to content

Commit a07a5a0

Browse files
Mo3m3nRoming22
authored andcommitted
Reorganize tekton-results
Reorganize tekton-results manifest in order to: - Prefer patchesStrategicMerge with kustomize rather than patchesJson6902, the first is clearer. - Move s3 logging config from developer folder to operator one - reflect s3 secrets layout from staging/prod
1 parent 6afe10d commit a07a5a0

File tree

18 files changed

+161
-195
lines changed

18 files changed

+161
-195
lines changed

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

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

55
resources:
6-
- openshift-pipelines
7-
- pipelines-as-code
8-
- tekton-chains
9-
- tekton-results
6+
- ../../../../../operator/gitops/argocd/pipeline-service
7+
8+
patchesStrategicMerge:
9+
- tekton-results/minio-create-bucket.yaml
1010

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

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

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

developer/openshift/gitops/argocd/pipeline-service/pipelines-as-code/kustomization.yaml

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

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

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

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
resources:
55
- ../../../../../../operator/gitops/argocd/pipeline-service/tekton-results/base
6-
- log-clusterrolebinding.yaml
76

87
patchesStrategicMerge:
9-
- minio-tls-patch.yaml
10-
- minio-user-cred-patch.yaml
11-
- s3-configuration-patch.yaml
8+
- minio-create-bucket.yaml

developer/openshift/gitops/argocd/pipeline-service/tekton-results/s3-configuration-patch.yaml renamed to developer/openshift/gitops/argocd/pipeline-service/tekton-results/minio-create-bucket.yaml

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,6 @@ spec:
99
spec:
1010
containers:
1111
- name: api
12-
env:
13-
# Enable logs api
14-
- name: LOGS_API
15-
value: "true"
16-
# Set up log type "S3"
17-
- name: LOGS_TYPE
18-
value: S3
19-
# Set up S3 bucket name, where will be stored logs
20-
- name: S3_BUCKET_NAME
21-
value: tekton-results
22-
# Set up Minio tenant endpoint url
23-
- name: S3_ENDPOINT
24-
value: https://minio.tekton-results.svc.cluster.local
25-
# Set up S3 endpoint host name without bucket prefix
26-
- name: S3_HOSTNAME_IMMUTABLE
27-
value: "true"
28-
# Set up S3 region
29-
- name: S3_REGION
30-
value: us-east-1
3112
initContainers:
3213
- name: mc
3314
image: >-
@@ -43,24 +24,29 @@ spec:
4324
echo "Minio bucket $S3_BUCKET_NAME successfully created.";
4425
fi
4526
imagePullPolicy: Always
46-
volumeMounts:
47-
- name: ca-s3
48-
mountPath: /etc/ssl/certs/s3-cert.crt
49-
subPath: s3-cert.crt
5027
env:
5128
- name: S3_ACCESS_KEY_ID
5229
valueFrom:
5330
secretKeyRef:
54-
key: S3_ACCESS_KEY_ID
31+
key: aws_access_key_id
5532
name: tekton-results-s3
5633
- name: S3_SECRET_ACCESS_KEY
5734
valueFrom:
5835
secretKeyRef:
59-
key: S3_SECRET_ACCESS_KEY
36+
key: aws_secret_access_key
37+
name: tekton-results-s3
38+
- name: S3_REGION
39+
valueFrom:
40+
secretKeyRef:
41+
key: aws_region
6042
name: tekton-results-s3
6143
- name: S3_BUCKET_NAME
62-
value: tekton-results
44+
valueFrom:
45+
secretKeyRef:
46+
key: bucket
47+
name: tekton-results-s3
6348
- name: S3_ENDPOINT
64-
value: https://minio.tekton-results.svc.cluster.local
65-
- name: S3_REGION
66-
value: us-east-1
49+
valueFrom:
50+
secretKeyRef:
51+
key: endpoint
52+
name: tekton-results-s3

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

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

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

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: tekton-results-api
6+
namespace: tekton-pipelines
7+
spec:
8+
template:
9+
spec:
10+
containers:
11+
- name: api
12+
env:
13+
- name: DB_USER
14+
valueFrom:
15+
secretKeyRef:
16+
name: tekton-results-database
17+
key: db.user
18+
- name: DB_PASSWORD
19+
valueFrom:
20+
secretKeyRef:
21+
name: tekton-results-database
22+
key: db.password
23+
- name: DB_HOST
24+
value:
25+
valueFrom:
26+
secretKeyRef:
27+
name: tekton-results-database
28+
key: db.host
29+
- name: DB_NAME
30+
value:
31+
valueFrom:
32+
secretKeyRef:
33+
name: tekton-results-database
34+
key: db.name

0 commit comments

Comments
 (0)