Skip to content

Commit 79e725c

Browse files
authored
add charts for 1.8 (#131)
* add charts for 1.8 * add base install action check Signed-off-by: Abner-1 <[email protected]>
1 parent 1806e0a commit 79e725c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+10573
-1
lines changed

.github/workflows/e2e-kruise.yaml

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: E2E-base
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- release-*
8+
pull_request: { }
9+
workflow_dispatch: { }
10+
11+
# Declare default permissions as read only.
12+
permissions: read-all
13+
14+
env:
15+
# Common versions
16+
GO_VERSION: '1.22'
17+
KIND_VERSION: 'v0.18.0'
18+
KIND_VERSION_FOR_HIGHER: 'v0.22.0'
19+
KIND_CLUSTER_NAME: 'ci-testing'
20+
# todo: add kruise e2e here
21+
jobs:
22+
# 1.27-
23+
install-for-lower:
24+
runs-on: ubuntu-20.04
25+
strategy:
26+
matrix:
27+
kind-version: [ v1.18.20, v1.20.15, v1.24.6, v1.26.3 ]
28+
steps:
29+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
with:
31+
submodules: true
32+
- name: Setup Kind Cluster ${{ matrix.kind-version }}
33+
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
34+
with:
35+
node_image: kindest/node:${{ matrix.kind-version }}
36+
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
37+
config: ./test/kind-conf.yaml
38+
version: ${{ env.KIND_VERSION }}
39+
- name: Install Kruise
40+
run: |
41+
make install-kruise-from-local
42+
- name: install Kruise state metrics
43+
run: |
44+
make install-kruise-state-metrics-from-local
45+
- name: install Kruise rollout
46+
if: ${{ ! startsWith(matrix.kind-version, 'v1.18') }}
47+
run: |
48+
make install-kruise-rollout-from-local
49+
- name: install Kruise game
50+
run: |
51+
make install-kruise-game-from-local
52+
53+
# 1.27+
54+
install-for-higher:
55+
runs-on: ubuntu-20.04
56+
strategy:
57+
matrix:
58+
kind-version: [ v1.28.7, v1.30.8 ]
59+
steps:
60+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
with:
62+
submodules: true
63+
- name: Setup Kind Cluster ${{ matrix.kind-version }}
64+
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
65+
with:
66+
node_image: kindest/node:${{ matrix.kind-version }}
67+
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
68+
config: ./test/kind-conf-with-vpa.yaml
69+
version: ${{ env.KIND_VERSION_FOR_HIGHER }}
70+
- name: Install Kruise
71+
run: |
72+
make install-kruise-from-local
73+
- name: install Kruise state metrics
74+
run: |
75+
make install-kruise-state-metrics-from-local
76+
- name: install Kruise rollout
77+
run: |
78+
make install-kruise-rollout-from-local
79+
- name: install Kruise game
80+
run: |
81+
make install-kruise-game-from-local

Makefile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
IMG ?= openkruise/kruise-manager:test
2+
3+
4+
.PHONY: install-kruise-from-local
5+
install-kruise-from-local:
6+
helm install kruise charts/kruise
7+
./scripts/check-kruise.sh
8+
9+
.PHONY: install-kruise-from-helm
10+
install-kruise-from-helm:
11+
helm install kruise openkruise/kruise
12+
./scripts/check-kruise.sh
13+
14+
.PHONY: install-kruise-state-metrics-from-local
15+
install-kruise-state-metrics-from-local:
16+
helm install kruise-sm charts/kruise-state-metrics --set installation.installServiceMonitor=false
17+
sleep 1
18+
kubectl -n kruise-system wait --for=condition=Ready pods -l control-plane=kruise-state-metrics --timeout=60s || exit 1
19+
20+
.PHONY: install-kruise-rollout-from-local
21+
install-kruise-rollout-from-local:
22+
helm install kruise-rollout charts/kruise-rollout
23+
sleep 1
24+
kubectl -n kruise-rollout wait --for=condition=Ready pods -l control-plane=kruise-rollout-controller-manager --timeout=60s || exit 1
25+
26+
27+
.PHONY: install-kruise-game-from-local
28+
install-kruise-game-from-local:
29+
helm install kruise-game charts/kruise-game
30+
sleep 1
31+
kubectl -n kruise-game-system wait --for=condition=Ready pods -l control-plane=kruise-game-controller-manager --timeout=60s || exit 1
32+
33+
install-from-local: install-kruise-from-local install-kruise-state-metrics-from-local

charts/kruise

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../versions/kruise/1.7.3
1+
../versions/kruise/1.8.0

scripts/check-kruise.sh

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2023 Alibaba Group Holding Ltd.
3+
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -ex
17+
18+
NODES=$(kubectl get node | wc -l)
19+
NODES=$(($NODES-1))
20+
EXCEPT_PODS=$(($NODES+2))
21+
for ((i=1;i<20;i++));
22+
do
23+
set +e
24+
PODS=$(kubectl get pod -n kruise-system | grep -c '1/1')
25+
set -e
26+
if [ "$PODS" -eq "$EXCEPT_PODS" ]; then
27+
break
28+
fi
29+
sleep 3
30+
done
31+
set +e
32+
PODS=$(kubectl get pod -n kruise-system | grep -c '1/1')
33+
kubectl get node
34+
kubectl get all -n kruise-system
35+
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --tail 100
36+
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true --tail 100
37+
set -e
38+
if [ "$PODS" -eq "$EXCEPT_PODS" ]; then
39+
echo "Wait for kruise-manager and kruise-daemon ready successfully"
40+
else
41+
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
42+
exit 1
43+
fi

test/kind-conf-with-vpa.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
- role: worker
6+
- role: worker
7+
- role: worker
8+
featureGates:
9+
InPlacePodVerticalScaling: true

test/kind-conf.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
- role: worker
6+
- role: worker
7+
- role: worker

versions/kruise-game/0.9/templates/manager.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ spec:
102102
- labelSelector:
103103
matchLabels:
104104
control-plane: {{ .Values.kruiseGame.fullname }}
105+
{{- if and ( eq (int .Capabilities.KubeVersion.Major) 1) ( gt (int .Capabilities.KubeVersion.Minor) 26 ) }}
105106
matchLabelKeys:
106107
- pod-template-hash
108+
{{- end }}
107109
maxSkew: 1
108110
topologyKey: topology.kubernetes.io/zone
109111
whenUnsatisfiable: ScheduleAnyway

versions/kruise-rollout/0.5/templates/manager.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ spec:
100100
- labelSelector:
101101
matchLabels:
102102
control-plane: {{ .Values.rollout.fullname }}
103+
{{- if and ( eq (int .Capabilities.KubeVersion.Major) 1) ( gt (int .Capabilities.KubeVersion.Minor) 26 ) }}
103104
matchLabelKeys:
104105
- pod-template-hash
106+
{{- end }}
105107
maxSkew: 1
106108
topologyKey: topology.kubernetes.io/zone
107109
whenUnsatisfiable: ScheduleAnyway

versions/kruise-rollout/0.6.0/templates/manager.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ spec:
100100
- labelSelector:
101101
matchLabels:
102102
control-plane: {{ .Values.rollout.fullname }}
103+
{{- if and ( eq (int .Capabilities.KubeVersion.Major) 1) ( gt (int .Capabilities.KubeVersion.Minor) 26 ) }}
103104
matchLabelKeys:
104105
- pod-template-hash
106+
{{- end }}
105107
maxSkew: 1
106108
topologyKey: topology.kubernetes.io/zone
107109
whenUnsatisfiable: ScheduleAnyway

versions/kruise-state-metrics/0.2/templates/deployment.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ spec:
6161
- labelSelector:
6262
matchLabels:
6363
{{- include "kruise-state-metrics.selectorLabels" . | nindent 12 }}
64+
{{- if and ( eq (int .Capabilities.KubeVersion.Major) 1) ( gt (int .Capabilities.KubeVersion.Minor) 26 ) }}
6465
matchLabelKeys:
6566
- pod-template-hash
67+
{{- end }}
6668
maxSkew: 1
6769
topologyKey: topology.kubernetes.io/zone
6870
whenUnsatisfiable: ScheduleAnyway

versions/kruise-state-metrics/0.2/templates/service.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ spec:
1717
selector:
1818
{{- include "kruise-state-metrics.selectorLabels" . | nindent 4 }}
1919
---
20+
{{- if .Values.installation.installServiceMonitor }}
2021
apiVersion: monitoring.coreos.com/v1
2122
kind: ServiceMonitor
2223
metadata:
@@ -30,3 +31,4 @@ spec:
3031
{{- include "kruise-state-metrics.labels" . | nindent 6 }}
3132
endpoints:
3233
- port: http-metrics
34+
{{- end}}

versions/kruise-state-metrics/0.2/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
installation:
66
namespace: kruise-system
77
createNamespace: false
8+
installServiceMonitor: true
89

910
replicaCount: 1
1011

versions/kruise/1.7.2/templates/manager.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ spec:
132132
- labelSelector:
133133
matchLabels:
134134
control-plane: controller-manager
135+
{{- if and ( eq (int .Capabilities.KubeVersion.Major) 1) ( gt (int .Capabilities.KubeVersion.Minor) 26 ) }}
135136
matchLabelKeys:
136137
- pod-template-hash
138+
{{- end }}
137139
maxSkew: 1
138140
topologyKey: topology.kubernetes.io/zone
139141
whenUnsatisfiable: ScheduleAnyway

versions/kruise/1.7.3/templates/manager.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ spec:
132132
- labelSelector:
133133
matchLabels:
134134
control-plane: controller-manager
135+
{{- if and ( eq (int .Capabilities.KubeVersion.Major) 1) ( gt (int .Capabilities.KubeVersion.Minor) 26 ) }}
135136
matchLabelKeys:
136137
- pod-template-hash
138+
{{- end }}
137139
maxSkew: 1
138140
topologyKey: topology.kubernetes.io/zone
139141
whenUnsatisfiable: ScheduleAnyway

versions/kruise/1.8.0/.helmignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj

versions/kruise/1.8.0/Chart.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v1
2+
name: kruise
3+
description: Helm chart for kruise components
4+
version: 1.8.0
5+
appVersion: 1.8.0
6+
kubeVersion: ">= 1.18.0-0"
7+
icon: https://openkruise.io/img/openkruise-logo-bg.jpg
8+
keywords:
9+
- openkruise
10+
- kubernetes
11+
- kruise
12+
- workload
13+
- statefulset
14+
- sidecar
15+
- job
16+
- deployment
17+
- cloneset
18+
home: https://openkruise.io
19+
sources:
20+
- https://github.com/openkruise/kruise
21+
annotations:
22+
artifacthub.io/changes: |
23+
- "[Changed]: https://github.com/openkruise/kruise/blob/master/CHANGELOG.md"
24+
- "[Security]: Fix potential security issues of dependent packages"

0 commit comments

Comments
 (0)