Prepare helmfile for the service cluster
This commit is contained in:
8
service/manifests/ip.yaml
Normal file
8
service/manifests/ip.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
apiVersion: metallb.io/v1beta1
|
||||
kind: IPAddressPool
|
||||
metadata:
|
||||
name: custom-addresspool
|
||||
namespace: metallb-system
|
||||
spec:
|
||||
addresses:
|
||||
- 192.168.5.15-192.168.5.15
|
20
service/manifests/pipeline-run.yaml
Normal file
20
service/manifests/pipeline-run.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
name: generate-ssh-key
|
||||
spec:
|
||||
pipelineRef:
|
||||
name: generate-ssh-key
|
||||
params:
|
||||
- name: username
|
||||
value: "Tekton"
|
||||
workspaces:
|
||||
- name: outputs
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce # access mode may affect how you can use this volume in parallel tasks
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
serviceAccountName: default
|
17
service/manifests/pipeline.yaml
Normal file
17
service/manifests/pipeline.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: generate-ssh-key
|
||||
spec:
|
||||
workspaces:
|
||||
- name: outputs
|
||||
params:
|
||||
- name: username
|
||||
type: string
|
||||
tasks:
|
||||
- name: generate-key
|
||||
taskRef:
|
||||
name: generate-key
|
||||
workspaces:
|
||||
- name: outputs
|
||||
workspaces: outputs
|
12
service/manifests/role-binding.yaml
Normal file
12
service/manifests/role-binding.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
namespace: 60927041-78c2-4095-a2f5-6443c20c # this is the namespace your service account is in
|
||||
roleRef: # referring to your ClusterRole
|
||||
kind: ClusterRole
|
||||
name: admin
|
||||
apiGroup: rbac.authorization.k8s.io
|
47
service/manifests/task.yaml
Normal file
47
service/manifests/task.yaml
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: generate-key
|
||||
spec:
|
||||
workspaces:
|
||||
- name: outputs
|
||||
mountPath: /tmp/outputs
|
||||
steps:
|
||||
- name: prepare-ssh-key
|
||||
image: ansible
|
||||
imagePullPolicy: Never
|
||||
script: |
|
||||
#!/bin/sh
|
||||
export SP_CUSTOMER=allanger
|
||||
export SP_ENV=default
|
||||
export SP_STATE=present
|
||||
export COLLECTIONS_PATHS=./.ansible/collection
|
||||
export COLLECTIONS_PATHS=./.ansible/collections
|
||||
export ANSIBLE_ROLES_PATH=$./.ansible/roles
|
||||
ansible-playbook /src/ssh-key-gen/playbook.yml -i /src/ssh-key-gen/inventory.yaml
|
||||
- name: print-keys
|
||||
image: alpine
|
||||
script:
|
||||
#!/bin/sh
|
||||
ls -R $(workspaces.outputs.path)
|
||||
- name: kubectl
|
||||
image: alpine/k8s:1.20.7
|
||||
script:
|
||||
#!/bin/sh
|
||||
kubectl get all
|
||||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: goodbye
|
||||
spec:
|
||||
params:
|
||||
- name: username
|
||||
type: string
|
||||
steps:
|
||||
- name: goodbye
|
||||
image: ubuntu
|
||||
script: |
|
||||
#!/bin/bash
|
||||
echo "Goodbye $(params.username)!"
|
Reference in New Issue
Block a user