Rename all postgresql-pod to postgresql-service.
Showing
8 changed files
with
26 additions
and
26 deletions
... | @@ -4,21 +4,21 @@ kind: Kustomization | ... | @@ -4,21 +4,21 @@ kind: Kustomization |
4 | resources: | 4 | resources: |
5 | - ./service-account.yaml | 5 | - ./service-account.yaml |
6 | - ./pipeline-postgresql-transformer.yaml | 6 | - ./pipeline-postgresql-transformer.yaml |
7 | - ./task-postgresql-pod.yaml | 7 | - ./task-postgresql-service.yaml |
8 | - ./task-postgresql-create-databases-users.yaml | 8 | - ./task-postgresql-create-databases-users.yaml |
9 | - ./task-postgresql-import.yaml | 9 | - ./task-postgresql-import.yaml |
10 | - ./task-postgresql-transformer.yaml | 10 | - ./task-postgresql-transformer.yaml |
11 | - ./task-postgresql-export.yaml | 11 | - ./task-postgresql-export.yaml |
12 | 12 | ||
13 | configMapGenerator: | 13 | configMapGenerator: |
14 | - name: task-postgresql-pod-kustomization | 14 | - name: task-postgresql-service-kustomization |
15 | options: | 15 | options: |
16 | disableNameSuffixHash: true | 16 | disableNameSuffixHash: true |
17 | files: | 17 | files: |
18 | - postgresql-pod_kustomization.yaml=postgresql-pod/kustomization.yaml | 18 | - postgresql-service_kustomization.yaml=postgresql-service/kustomization.yaml |
19 | - postgresql-pod_postgresql-pod.yaml=postgresql-pod/postgresql-pod.yaml | 19 | - postgresql-service_postgresql-service.yaml=postgresql-service/postgresql-service.yaml |
20 | - postgresql-pod_set-deployment-config_deployment-config.env=postgresql-pod/set-deployment-config/deployment-config.env | 20 | - postgresql-service_set-deployment-config_deployment-config.env=postgresql-service/set-deployment-config/deployment-config.env |
21 | - postgresql-pod_set-deployment-config_kustomization.yaml=postgresql-pod/set-deployment-config/kustomization.yaml | 21 | - postgresql-service_set-deployment-config_kustomization.yaml=postgresql-service/set-deployment-config/kustomization.yaml |
22 | 22 | ||
23 | - name: task-postgresql-confd | 23 | - name: task-postgresql-confd |
24 | options: | 24 | options: | ... | ... |
... | @@ -48,7 +48,7 @@ spec: | ... | @@ -48,7 +48,7 @@ spec: |
48 | value: ["$(params.s3-items[*])"] | 48 | value: ["$(params.s3-items[*])"] |
49 | - name: postgresql-service | 49 | - name: postgresql-service |
50 | taskRef: | 50 | taskRef: |
51 | name: task-postgresql-pod | 51 | name: task-postgresql-service |
52 | 52 | ||
53 | - name: create-databases-users | 53 | - name: create-databases-users |
54 | taskRef: | 54 | taskRef: | ... | ... |
... | @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 | ... | @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 |
2 | kind: Kustomization | 2 | kind: Kustomization |
3 | 3 | ||
4 | resources: | 4 | resources: |
5 | - postgresql-pod.yaml | 5 | - postgresql-service.yaml |
6 | 6 | ||
7 | components: | 7 | components: |
8 | - set-deployment-config | 8 | - set-deployment-config | ... | ... |
... | @@ -2,12 +2,12 @@ | ... | @@ -2,12 +2,12 @@ |
2 | apiVersion: v1 | 2 | apiVersion: v1 |
3 | kind: ServiceAccount | 3 | kind: ServiceAccount |
4 | metadata: | 4 | metadata: |
5 | name: task-postgresql-pod-sa | 5 | name: task-postgresql-service-sa |
6 | --- | 6 | --- |
7 | apiVersion: rbac.authorization.k8s.io/v1 | 7 | apiVersion: rbac.authorization.k8s.io/v1 |
8 | kind: Role | 8 | kind: Role |
9 | metadata: | 9 | metadata: |
10 | name: task-postgresql-pod-sa | 10 | name: task-postgresql-service-sa |
11 | rules: | 11 | rules: |
12 | - apiGroups: | 12 | - apiGroups: |
13 | - "" | 13 | - "" |
... | @@ -20,13 +20,13 @@ rules: | ... | @@ -20,13 +20,13 @@ rules: |
20 | apiVersion: rbac.authorization.k8s.io/v1 | 20 | apiVersion: rbac.authorization.k8s.io/v1 |
21 | kind: RoleBinding | 21 | kind: RoleBinding |
22 | metadata: | 22 | metadata: |
23 | name: task-postgresql-pod-sa | 23 | name: task-postgresql-service-sa |
24 | subjects: | 24 | subjects: |
25 | - kind: ServiceAccount | 25 | - kind: ServiceAccount |
26 | name: task-postgresql-pod-sa | 26 | name: task-postgresql-service-sa |
27 | roleRef: | 27 | roleRef: |
28 | kind: Role | 28 | kind: Role |
29 | name: task-postgresql-pod-sa | 29 | name: task-postgresql-service-sa |
30 | apiGroup: rbac.authorization.k8s.io | 30 | apiGroup: rbac.authorization.k8s.io |
31 | --- | 31 | --- |
32 | 32 | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | apiVersion: tekton.dev/v1beta1 | 2 | apiVersion: tekton.dev/v1beta1 |
3 | kind: Task | 3 | kind: Task |
4 | metadata: | 4 | metadata: |
5 | name: task-postgresql-pod | 5 | name: task-postgresql-service |
6 | spec: | 6 | spec: |
7 | description: >- | 7 | description: >- |
8 | This Task deploys (or delete) a Kubernetes resource (pod). It uses | 8 | This Task deploys (or delete) a Kubernetes resource (pod). It uses |
... | @@ -18,17 +18,17 @@ spec: | ... | @@ -18,17 +18,17 @@ spec: |
18 | results: | 18 | results: |
19 | - name: service-name | 19 | - name: service-name |
20 | volumes: | 20 | volumes: |
21 | - name: task-postgresql-pod-kustomization | 21 | - name: task-postgresql-service-kustomization |
22 | configMap: | 22 | configMap: |
23 | name: task-postgresql-pod-kustomization | 23 | name: task-postgresql-service-kustomization |
24 | steps: | 24 | steps: |
25 | - name: mount-postgresql-pod-kustomization | 25 | - name: mount-postgresql-service-kustomization |
26 | image: $(params.bash-image) | 26 | image: $(params.bash-image) |
27 | script: | | 27 | script: | |
28 | #!/usr/bin/env bash | 28 | #!/usr/bin/env bash |
29 | set -ex | 29 | set -ex |
30 | mkdir /workspace/kustomizations | 30 | mkdir /workspace/kustomizations |
31 | cd /srv/task-postgresql-pod-kustomization-cm/ | 31 | cd /srv/task-postgresql-service-kustomization-cm/ |
32 | for file in *; do | 32 | for file in *; do |
33 | translated="$(echo "$file" | sed "s,_,/,g")" | 33 | translated="$(echo "$file" | sed "s,_,/,g")" |
34 | dir="$(dirname "$translated")" | 34 | dir="$(dirname "$translated")" |
... | @@ -37,14 +37,14 @@ spec: | ... | @@ -37,14 +37,14 @@ spec: |
37 | cp "$file" "/workspace/kustomizations/$dir/$base" | 37 | cp "$file" "/workspace/kustomizations/$dir/$base" |
38 | done | 38 | done |
39 | volumeMounts: | 39 | volumeMounts: |
40 | - name: task-postgresql-pod-kustomization | 40 | - name: task-postgresql-service-kustomization |
41 | mountPath: /srv/task-postgresql-pod-kustomization-cm | 41 | mountPath: /srv/task-postgresql-service-kustomization-cm |
42 | - name: run-kustomize-4-x | 42 | - name: run-kustomize-4-x |
43 | image: $(params.kustomize-image) | 43 | image: $(params.kustomize-image) |
44 | script: | | 44 | script: | |
45 | #!/bin/sh | 45 | #!/bin/sh |
46 | set -ex | 46 | set -ex |
47 | kustomize build /workspace/kustomizations/postgresql-pod > /workspace/postgresql-pod.yaml | 47 | kustomize build /workspace/kustomizations/postgresql-service > /workspace/postgresql-service.yaml |
48 | env: | 48 | env: |
49 | - name: PARENT_POD_NAME | 49 | - name: PARENT_POD_NAME |
50 | valueFrom: | 50 | valueFrom: |
... | @@ -60,16 +60,16 @@ spec: | ... | @@ -60,16 +60,16 @@ spec: |
60 | script: | | 60 | script: | |
61 | #!/usr/bin/env bash | 61 | #!/usr/bin/env bash |
62 | set -ex | 62 | set -ex |
63 | cat /workspace/postgresql-pod.yaml | 63 | cat /workspace/postgresql-service.yaml |
64 | sed -i -e 's/^ name:/ generateName:/' /workspace/postgresql-pod.yaml | 64 | sed -i -e 's/^ name:/ generateName:/' /workspace/postgresql-service.yaml |
65 | cat /workspace/postgresql-pod.yaml | 65 | cat /workspace/postgresql-service.yaml |
66 | - name: create-postgresql-pod | 66 | - name: create-postgresql-service |
67 | image: $(params.kubectl-image) | 67 | image: $(params.kubectl-image) |
68 | script: | | 68 | script: | |
69 | #!/usr/bin/env bash | 69 | #!/usr/bin/env bash |
70 | 70 | ||
71 | set -ex | 71 | set -ex |
72 | kubectl create -f /workspace/postgresql-pod.yaml -o go-template --template '{{ if eq .kind "Service" }}{{.metadata.name }}{{ end }}' > $(results.service-name.path) | 72 | kubectl create -f /workspace/postgresql-service.yaml -o go-template --template '{{ if eq .kind "Service" }}{{.metadata.name }}{{ end }}' > $(results.service-name.path) |
73 | echo "servie name: $(cat $(results.service-name.path))" | 73 | echo "servie name: $(cat $(results.service-name.path))" |
74 | 74 | ||
75 | --- | 75 | --- | ... | ... |
-
Please register or sign in to post a comment