-
Notifications
You must be signed in to change notification settings - Fork 129
Expand file tree
/
Copy pathaction.yml
More file actions
109 lines (97 loc) · 3.69 KB
/
action.yml
File metadata and controls
109 lines (97 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: "Deploy Keptn on GH cluster"
description: "Creates a Kind cluster and deploys Keptn"
inputs:
kind-version:
required: false
description: "Version of kind that should be used"
# renovate: datasource=github-releases depName=kubernetes-sigs/kind
default: "v0.24.0"
k8s-version:
required: false
description: "Kubernetes version that should be used"
# renovate: datasource=github-releases depName=kubernetes/kubernetes
default: "v1.31.0"
runtime_tag:
description: "Tag for the runner image"
required: true
cluster-name:
required: false
description: "Name of the kind cluster"
default: "test-cluster"
values-file:
required: false
description: "Values file used for Keptn installation configuration"
default: "values.yaml"
cert-manager-io-enabled:
required: false
description: "Decides whether to use cert-manager.io"
default: "cert_manager_io_off"
runs:
using: "composite"
steps:
- name: Set up Go 1.x
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
cache-dependency-path: '**/go.sum'
check-latest: true
- name: Download artifacts
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4
with:
path: ~/download/artifacts
- name: "Create single kind Cluster"
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
cluster_name: ${{ inputs.cluster-name }}
version: ${{ inputs.kind-version }}
node_image: "kindest/node:${{ inputs.k8s-version }}"
kubectl_version: ${{ inputs.k8s-version }}
- name: Import images in k3d
shell: bash
run: |
cd ~/download/artifacts
for image in $(ls | grep image.tar);
do
echo "Importing image: $image"
kind load image-archive $image/$image -n ${{ inputs.cluster-name }}
done
- name: Install cert-manager.io
if: inputs.cert-manager-io-enabled == 'cert_manager_io_on'
env:
# renovate: datasource=github-releases depName=cert-manager/cert-manager
CERT_MANAGER_IO_VERSION: "v1.20.2"
shell: bash
run: |
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/$CERT_MANAGER_IO_VERSION/cert-manager.yaml
kubectl wait --for=condition=Available deployment/cert-manager-webhook -n cert-manager --timeout=120s
kubectl wait --for=condition=ready pod -l app=webhook -n cert-manager --timeout=60s
kubectl create ns keptn-system
kubectl apply -f .github/actions/deploy-keptn-on-cluster/values/certificate.yaml
- name: Install Keptn with helm
env:
RELEASE_REGISTRY: "localhost:5000/keptn"
shell: bash
run: |
echo "Installing Keptn using helm"
helm version
helm repo add keptn "https://charts.lifecycle.keptn.sh"
helm repo update
for chart_dir in ./lifecycle-operator/chart \
./metrics-operator/chart \
./keptn-cert-manager/chart \
./chart; do
cd "$chart_dir"
echo "updating charts for" $chart_dir
helm dependency update
helm dependency build
cd - # Return to the previous directory
done
cd .github/actions/deploy-keptn-on-cluster
export TAG=${{ inputs.runtime_tag }}
envsubst < values/${{ inputs.values-file }} > tmp.yaml
echo "installing with values.yaml file:"
cat tmp.yaml
helm install -n keptn-system --create-namespace keptn ../../../chart \
--values ./tmp.yaml \
--debug --wait --timeout 1m