-
Notifications
You must be signed in to change notification settings - Fork 50
338 lines (330 loc) · 12.1 KB
/
k8s_versions.yml
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
name: Kubernetes Versions
on:
# push:
# branches: [ '*' ]
workflow_dispatch:
pull_request:
branches: [ main ]
env:
COLORTERM: 'yes'
TERM: 'xterm-256color'
jobs:
minikube:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- K8S_VERSION: v1.29.0
- K8S_VERSION: v1.28.4
- K8S_VERSION: v1.27.8
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Install httpie
run: |
echo ::group::HTTPIE
sudo apt-get update -yq
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie
echo ::endgroup::
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
echo "CI_TEST=true" >> $GITHUB_ENV
echo "TEST=pulp" >> $GITHUB_ENV
shell: bash
- name: Updating registries configuration
run: |
if [ -f "/etc/docker/daemon.json" ]
then
echo "INFO:
Updating docker configuration
"
echo "$(cat /etc/docker/daemon.json | jq -s '.[0] + {
"insecure-registries" : ["ingress.local","nodeport.local:30000"]
}')" | sudo tee /etc/docker/daemon.json
sudo service docker restart || true
fi
if [ -f "/etc/containers/registries.conf" ]
then
echo "INFO:
Updating registries configuration
"
echo "[registries.insecure]
registries = ['ingress.local','nodeport.local:30000']
" | sudo tee -a /etc/containers/registries.conf
fi
shell: bash
- name: Start minikube
run: |
minikube start --memory=max --cpus=max --driver=docker --extra-config=apiserver.service-node-port-range=80-32000 --kubernetes-version=${{ matrix.K8S_VERSION }}
minikube addons enable metrics-server
echo "Kubernetes version:"
kubectl version -ojson|jq .serverVersion
- name: Try the cluster !
run: kubectl get pods -A
- name: Setup a minikube docker env
run: minikube -p minikube docker-env | grep "export" | sed 's/export //' | sed 's/"//g' >> $GITHUB_ENV
- name: Uninstalling GHA kustomize
run: |
# hack for uninstalling kustomize from GHA
mv /usr/local/bin/kustomize /usr/local/bin/ghakustomize
make kustomize
mv ./bin/kustomize /usr/local/bin/kustomize
kustomize version
shell: bash
- name: Check code format and generate manifests
run: |
make manifests generate fmt vet
shell: bash
- name: Deploy pulp-operator to K8s
run: |
make local
kubectl get namespace
kubectl config set-context --current --namespace=pulp-operator-system
kubectl apply -f .ci/assets/kubernetes/pulp-admin-password.secret.yaml
kubectl apply -f config/samples/k8s_versions_ci.yaml
shell: bash
- name: Check and wait pulp-operator deploy
run: kubectl wait --for condition=Pulp-Operator-Finished-Execution pulp/example-pulp --timeout=900s
shell: bash
- name: Test all components
run: |
export INGRESS_TYPE=nodeport
.ci/scripts/pulp_tests.sh -m
shell: bash
env:
PY_COLORS: '1'
- name: Logs
if: always()
run: .github/workflows/scripts/show_logs.sh
kind:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- K8S_VERSION: v1.29.0
- K8S_VERSION: v1.28.0
- K8S_VERSION: v1.27.0
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Install httpie
run: |
echo ::group::HTTPIE
sudo apt-get update -yq
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie
echo ::endgroup::
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
echo "CI_TEST=true" >> $GITHUB_ENV
echo "TEST=pulp" >> $GITHUB_ENV
echo "COMPONENT_TYPE=${{ matrix.COMPONENT_TYPE }}" >> $GITHUB_ENV
shell: bash
- name: Updating registries configuration
run: |
if [ -f "/etc/docker/daemon.json" ]
then
echo "INFO:
Updating docker configuration
"
echo "$(cat /etc/docker/daemon.json | jq -s '.[0] + {
"insecure-registries" : ["ingress.local","nodeport.local:5001","nodeport.local:30000"]
}')" | sudo tee /etc/docker/daemon.json
sudo service docker restart || true
fi
if [ -f "/etc/containers/registries.conf" ]
then
echo "INFO:
Updating registries configuration
"
echo "[registries.insecure]
registries = ['ingress.local','nodeport.local:5001','nodeport.local:30000']
" | sudo tee -a /etc/containers/registries.conf
fi
shell: bash
- name: Install kind
run: |
.ci/scripts/kind_with_registry.sh ${{ matrix.K8S_VERSION }}
echo "Kubernetes version:"
kubectl version -ojson|jq .serverVersion
kubectl wait --for=condition=Ready node/kind-control-plane
shell: bash
- name: Uninstalling GHA kustomize
run: |
# hack for uninstalling kustomize from GHA
mv /usr/local/bin/kustomize /usr/local/bin/ghakustomize
make kustomize
mv ./bin/kustomize /usr/local/bin/kustomize
kustomize version
shell: bash
- name: Check code format and generate manifests
run: |
make manifests generate fmt vet
shell: bash
- name: Prepare Object Storage
run: |
.ci/scripts/prepare-object-storage.sh
shell: bash
- name: Deploy pulp-operator to K8s
run: |
make local
kubectl get namespace
kubectl config set-context --current --namespace=pulp-operator-system
kubectl apply -f .ci/assets/kubernetes/pulp-admin-password.secret.yaml
kubectl apply -f config/samples/k8s_versions_ci.yaml
shell: bash
- name: Check and wait pulp-operator deploy
run: kubectl wait --for condition=Pulp-Operator-Finished-Execution pulp/example-pulp --timeout=900s
shell: bash
- name: Test all components
run: |
export INGRESS_TYPE=nodeport
.ci/scripts/pulp_tests.sh -k
shell: bash
env:
PY_COLORS: '1'
- name: Logs
if: always()
run: |
.github/workflows/scripts/show_logs.sh -k
shell: bash
eks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
#- K8S_VERSION: 1.29
- K8S_VERSION: 1.28
- K8S_VERSION: 1.27
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Install httpie
run: |
echo ::group::HTTPIE
sudo apt-get update -yq
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie
echo ::endgroup::
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
echo "CI_TEST=true" >> $GITHUB_ENV
echo "TEST=pulp" >> $GITHUB_ENV
shell: bash
- name: Updating registries configuration
run: |
if [ -f "/etc/docker/daemon.json" ]
then
echo "INFO:
Updating docker configuration
"
echo "$(cat /etc/docker/daemon.json | jq -s '.[0] + {
"insecure-registries" : ["ingress.local","nodeport.local:30000"]
}')" | sudo tee /etc/docker/daemon.json
sudo service docker restart || true
fi
if [ -f "/etc/containers/registries.conf" ]
then
echo "INFO:
Updating registries configuration
"
echo "[registries.insecure]
registries = ['ingress.local','nodeport.local:30000']
" | sudo tee -a /etc/containers/registries.conf
fi
shell: bash
- name: Uninstalling GHA kustomize
run: |
# hack for uninstalling kustomize from GHA
mv /usr/local/bin/kustomize /usr/local/bin/ghakustomize
make kustomize
mv ./bin/kustomize /usr/local/bin/kustomize
kustomize version
shell: bash
- name: Install eksctl
run: |
curl "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" --silent --location | tar xz -C /tmp
sudo install -m 0755 /tmp/eksctl /usr/local/bin/eksctl
shell: bash
- name: Install yq
run: |
VERSION=v4.40.5
BINARY=yq_linux_amd64
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - | tar xz && sudo mv ${BINARY} /usr/bin/yq
shell: bash
- name: Install eksctl-anywhere
run: |
RELEASE_VERSION=v0.18.3
EKS_ANYWHERE_TARBALL_URL=$(curl https://anywhere-assets.eks.amazonaws.com/releases/eks-a/manifest.yaml --silent --location | yq ".spec.releases[] | select(.version==\"$RELEASE_VERSION\").eksABinary.$(uname -s | tr A-Z a-z).uri")
curl $EKS_ANYWHERE_TARBALL_URL --silent --location | tar xz ./eksctl-anywhere
sudo install -m 0755 ./eksctl-anywhere /usr/local/bin/eksctl-anywhere
shell: bash
- name: Install kubectl
run: |
export OS="$(uname -s | tr A-Z a-z)" ARCH=$(test "$(uname -m)" = 'x86_64' && echo 'amd64' || echo 'arm64')
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/${OS}/${ARCH}/kubectl"
sudo install -m 0755 ./kubectl /usr/local/bin/kubectl
shell: bash
- name: Deploy eks-a
run: |
CLUSTER_NAME=mgmt
kustomize build config/eks-anywhere/eks/${{ matrix.K8s_VERSION }} > $CLUSTER_NAME.yaml
sudo eksctl anywhere create cluster -f $CLUSTER_NAME.yaml
sudo chown -R $(id -u) mgmt/
mkdir ~/.kube
cp ${PWD}/${CLUSTER_NAME}/${CLUSTER_NAME}-eks-a-cluster.kubeconfig ~/.kube/config
kubectl version -ojson|jq .serverVersion
kubectl get pods -A
# this folder was breaking kustomize execution
sudo rm -rf eksa-cli-logs/
shell: bash
- name: Check code format and generate manifests
run: |
make manifests generate fmt vet
shell: bash
- name: Deploy localpath StorageClass
run: |
kustomize build config/eks-anywhere/localpath-sc/ | kubectl apply -f-
shell: bash
- name: Deploy pulp-operator to K8s
run: |
make local
kubectl get namespace
kubectl config set-context --current --namespace=pulp-operator-system
kubectl apply -f .ci/assets/kubernetes/pulp-admin-password.secret.yaml
kubectl apply -f config/samples/k8s_versions_ci.yaml
shell: bash
- name: Check and wait pulp-operator deploy
run: kubectl wait --for condition=Pulp-Operator-Finished-Execution pulp/example-pulp --timeout=900s
- name: Test all components
run: |
export INGRESS_TYPE=nodeport
.ci/scripts/pulp_tests.sh --eks
shell: bash
env:
PY_COLORS: '1'
- name: Logs
if: always()
run: .github/workflows/scripts/show_logs.sh --eks