Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
tekton-postgresql
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c10ad388
authored
2022-02-23 16:08:14 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Rename all postgresql-pod to postgresql-service.
1 parent
2114ae25
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
26 deletions
kustomization.yaml
pipeline-postgresql-transformer.yaml
postgresql-pod/kustomization.yaml → postgresql-service/kustomization.yaml
postgresql-pod/postgresql-pod.yaml → postgresql-service/postgresql-service.yaml
postgresql-pod/set-deployment-config/deployment-config.env → postgresql-service/set-deployment-config/deployment-config.env
postgresql-pod/set-deployment-config/kustomization.yaml → postgresql-service/set-deployment-config/kustomization.yaml
service-account.yaml
task-postgresql-pod.yaml → task-postgresql-service.yaml
kustomization.yaml
View file @
c10ad38
...
...
@@ -4,21 +4,21 @@ kind: Kustomization
resources
:
-
./service-account.yaml
-
./pipeline-postgresql-transformer.yaml
-
./task-postgresql-
pod
.yaml
-
./task-postgresql-
service
.yaml
-
./task-postgresql-create-databases-users.yaml
-
./task-postgresql-import.yaml
-
./task-postgresql-transformer.yaml
-
./task-postgresql-export.yaml
configMapGenerator
:
-
name
:
task-postgresql-
pod
-kustomization
-
name
:
task-postgresql-
service
-kustomization
options
:
disableNameSuffixHash
:
true
files
:
-
postgresql-
pod_kustomization.yaml=postgresql-pod
/kustomization.yaml
-
postgresql-
pod_postgresql-pod.yaml=postgresql-pod/postgresql-pod
.yaml
-
postgresql-
pod_set-deployment-config_deployment-config.env=postgresql-pod
/set-deployment-config/deployment-config.env
-
postgresql-
pod_set-deployment-config_kustomization.yaml=postgresql-pod
/set-deployment-config/kustomization.yaml
-
postgresql-
service_kustomization.yaml=postgresql-service
/kustomization.yaml
-
postgresql-
service_postgresql-service.yaml=postgresql-service/postgresql-service
.yaml
-
postgresql-
service_set-deployment-config_deployment-config.env=postgresql-service
/set-deployment-config/deployment-config.env
-
postgresql-
service_set-deployment-config_kustomization.yaml=postgresql-service
/set-deployment-config/kustomization.yaml
-
name
:
task-postgresql-confd
options
:
...
...
pipeline-postgresql-transformer.yaml
View file @
c10ad38
...
...
@@ -48,7 +48,7 @@ spec:
value
:
[
"
$(params.s3-items[*])"
]
-
name
:
postgresql-service
taskRef
:
name
:
task-postgresql-
pod
name
:
task-postgresql-
service
-
name
:
create-databases-users
taskRef
:
...
...
postgresql-
pod
/kustomization.yaml
→
postgresql-
service
/kustomization.yaml
View file @
c10ad38
...
...
@@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind
:
Kustomization
resources
:
-
postgresql-
pod
.yaml
-
postgresql-
service
.yaml
components
:
-
set-deployment-config
...
...
postgresql-
pod/postgresql-pod
.yaml
→
postgresql-
service/postgresql-service
.yaml
View file @
c10ad38
File moved
postgresql-
pod
/set-deployment-config/deployment-config.env
→
postgresql-
service
/set-deployment-config/deployment-config.env
View file @
c10ad38
File moved
postgresql-
pod
/set-deployment-config/kustomization.yaml
→
postgresql-
service
/set-deployment-config/kustomization.yaml
View file @
c10ad38
File moved
service-account.yaml
View file @
c10ad38
...
...
@@ -2,12 +2,12 @@
apiVersion
:
v1
kind
:
ServiceAccount
metadata
:
name
:
task-postgresql-
pod
-sa
name
:
task-postgresql-
service
-sa
---
apiVersion
:
rbac.authorization.k8s.io/v1
kind
:
Role
metadata
:
name
:
task-postgresql-
pod
-sa
name
:
task-postgresql-
service
-sa
rules
:
-
apiGroups
:
-
"
"
...
...
@@ -20,13 +20,13 @@ rules:
apiVersion
:
rbac.authorization.k8s.io/v1
kind
:
RoleBinding
metadata
:
name
:
task-postgresql-
pod
-sa
name
:
task-postgresql-
service
-sa
subjects
:
-
kind
:
ServiceAccount
name
:
task-postgresql-
pod
-sa
name
:
task-postgresql-
service
-sa
roleRef
:
kind
:
Role
name
:
task-postgresql-
pod
-sa
name
:
task-postgresql-
service
-sa
apiGroup
:
rbac.authorization.k8s.io
---
...
...
task-postgresql-
pod
.yaml
→
task-postgresql-
service
.yaml
View file @
c10ad38
...
...
@@ -2,7 +2,7 @@
apiVersion
:
tekton.dev/v1beta1
kind
:
Task
metadata
:
name
:
task-postgresql-
pod
name
:
task-postgresql-
service
spec
:
description
:
>-
This Task deploys (or delete) a Kubernetes resource (pod). It uses
...
...
@@ -18,17 +18,17 @@ spec:
results:
- name: service-name
volumes:
- name: task-postgresql-
pod
-kustomization
- name: task-postgresql-
service
-kustomization
configMap:
name: task-postgresql-
pod
-kustomization
name: task-postgresql-
service
-kustomization
steps:
- name: mount-postgresql-
pod
-kustomization
- name: mount-postgresql-
service
-kustomization
image: $(params.bash-image)
script: |
#!/usr/bin/env bash
set -ex
mkdir /workspace/kustomizations
cd /srv/task-postgresql-
pod
-kustomization-cm/
cd /srv/task-postgresql-
service
-kustomization-cm/
for file in *; do
translated="$(echo "$file" | sed "s,_,/,g")"
dir="$(dirname "$translated")"
...
...
@@ -37,14 +37,14 @@ spec:
cp "$file" "/workspace/kustomizations/$dir/$base"
done
volumeMounts:
- name: task-postgresql-
pod
-kustomization
mountPath: /srv/task-postgresql-
pod
-kustomization-cm
- name: task-postgresql-
service
-kustomization
mountPath: /srv/task-postgresql-
service
-kustomization-cm
- name: run-kustomize-4-x
image: $(params.kustomize-image)
script: |
#!/bin/sh
set -ex
kustomize build /workspace/kustomizations/postgresql-
pod > /workspace/postgresql-pod
.yaml
kustomize build /workspace/kustomizations/postgresql-
service > /workspace/postgresql-service
.yaml
env:
- name: PARENT_POD_NAME
valueFrom:
...
...
@@ -60,16 +60,16 @@ spec:
script: |
#!/usr/bin/env bash
set -ex
cat /workspace/postgresql-
pod
.yaml
sed -i -e 's/^ name:/ generateName:/' /workspace/postgresql-
pod
.yaml
cat /workspace/postgresql-
pod
.yaml
- name: create-postgresql-
pod
cat /workspace/postgresql-
service
.yaml
sed -i -e 's/^ name:/ generateName:/' /workspace/postgresql-
service
.yaml
cat /workspace/postgresql-
service
.yaml
- name: create-postgresql-
service
image: $(params.kubectl-image)
script: |
#!/usr/bin/env bash
set -ex
kubectl create -f /workspace/postgresql-
pod
.yaml -o go-template --template '{{ if eq .kind "Service" }}{{.metadata.name }}{{ end }}' > $(results.service-name.path)
kubectl create -f /workspace/postgresql-
service
.yaml -o go-template --template '{{ if eq .kind "Service" }}{{.metadata.name }}{{ end }}' > $(results.service-name.path)
echo "servie name: $(cat $(results.service-name.path))"
---
...
...
Please
register
or
sign in
to post a comment