forked from thanos-community/thanos-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (81 loc) · 2.72 KB
/
helm-chart.yml
File metadata and controls
97 lines (81 loc) · 2.72 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
name: Helm Chart
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
paths:
- 'bundle.yaml'
- 'helm/chart/**'
env:
golang-version: '1.25'
kind-version: 'v0.30.0'
kind-image: 'kindest/node:v1.34.0'
permissions:
contents: read
pull-requests: read
jobs:
test-e2e:
name: Run on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout code into the Go module directory.
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.golang-version }}
- uses: actions/cache@v5
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Build Helm chart
run: make build-chart
- name: Start kind cluster
uses: helm/kind-action@v1.13.0
with:
version: ${{ env.kind-version }}
node_image: ${{ env.kind-image }}
wait: 10s
cluster_name: kind
- name: Wait for cluster to bootstrap
run: kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s
- name: Prepare thanos-operator
run: |
go mod tidy
make docker-build IMG=thanos-operator:v0.1.0
kind load docker-image thanos-operator:v0.1.0
- name: Install Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm version
- name: Lint Helm Chart
run: |
helm lint ./helm/chart
- name: Install Prometheus Operator CRDs
run: |
helm install prometheus-crds oci://ghcr.io/prometheus-community/charts/prometheus-operator-crds
- name: Create namespace for thanos-operator
run: |
kubectl create namespace thanos-operator-system || true
- name: Install Helm chart for project using server-side apply
run: |
helm template my-release ./helm/chart --namespace thanos-operator-system | \
kubectl apply --server-side -f -
- name: Verify deployment
run: |
echo "Checking for CRDs..."
kubectl get crd thanoscompacts.monitoring.thanos.io
kubectl get crd thanosqueries.monitoring.thanos.io
kubectl get crd thanosreceives.monitoring.thanos.io
kubectl get crd thanosrulers.monitoring.thanos.io
kubectl get crd thanosstores.monitoring.thanos.io
echo "Checking for operator deployment..."
kubectl get deployment -n thanos-operator-system
kubectl wait --for=condition=Available deployment --all -n thanos-operator-system --timeout=300s