Skip to content

Commit

Permalink
eks clusters migration (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
gurevichdmitry authored Jul 26, 2023
1 parent f7aaa6d commit 1015aad
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 14 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/eks-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ on:
- "[0-9]+.[0-9]+"

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_TEST_ACC }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_TEST_ACC }}
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONTAINER_SUFFIX: ${{ github.run_id }}
TEST_TARGETS_DEFAULT: '["pre_merge"]'
AWS_REGION: eu-west-2
REPORTS_DIR: tests/allure/results/
KUBE_NAMESPACE: kube-system
CI_ELASTIC_AGENT_DOCKER_TAG: "8.7.0-SNAPSHOT"
CI_ELASTIC_AGENT_DOCKER_IMAGE: "704479110758.dkr.ecr.eu-west-2.amazonaws.com/elastic-agent"
CI_ELASTIC_AGENT_DOCKER_TAG: "8.10.0-SNAPSHOT"
CI_ELASTIC_AGENT_DOCKER_IMAGE: "391946104644.dkr.ecr.eu-west-2.amazonaws.com/elastic-agent"

# run only a single job at a time
concurrency: EKS-Functional-Tests
Expand Down Expand Up @@ -250,6 +250,8 @@ jobs:
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_REGION: eu-west-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
storageType: s3
resultsGlob: "tests/allure/results"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Service]
Environment='KUBELET_ARGS=--node-ip=192.168.15.75 --pod-infra-container-image=602401143452.dkr.ecr.eu-west-2.amazonaws.com/eks/pause:3.5 --v=2 --cloud-provider=aws --read-only-port=26492 --streaming-connection-idle-timeout=0'
Environment='KUBELET_ARGS=--node-ip=192.168.29.162 --pod-infra-container-image=602401143452.dkr.ecr.eu-west-2.amazonaws.com/eks/pause:3.5 --v=2 --cloud-provider=aws --read-only-port=26492 --streaming-connection-idle-timeout=0'
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"clusterDNS": [
"10.100.0.10"
],
"kubeAPIQPS": 10,
"kubeAPIBurst": 20,
"evictionHard": {
"memory.available": "100Mi",
"nodefs.available": "10%",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Service]
Environment='KUBELET_ARGS=--node-ip=192.168.38.87 --pod-infra-container-image=602401143452.dkr.ecr.eu-west-2.amazonaws.com/eks/pause:3.5 --v=2 --cloud-provider=aws --make-iptables-util-chains=false --event-qps=5 --hostname-override'
Environment='KUBELET_ARGS=--node-ip=192.168.93.227 --pod-infra-container-image=602401143452.dkr.ecr.eu-west-2.amazonaws.com/eks/pause:3.5 --v=2 --cloud-provider=aws --make-iptables-util-chains=false --event-qps=5 --hostname-override'
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
"clusterDNS": [
"10.100.0.10"
],
"kubeAPIQPS": 10,
"kubeAPIBurst": 20,
"evictionHard": {
"memory.available": "100Mi",
"nodefs.available": "10%",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Service]
Environment='KUBELET_ARGS=--node-ip=192.168.14.74 --pod-infra-container-image=602401143452.dkr.ecr.eu-west-2.amazonaws.com/eks/pause:3.5 --v=2 --streaming-connection-idle-timeout=26492s'
Environment='KUBELET_ARGS=--node-ip=192.168.33.106 --pod-infra-container-image=602401143452.dkr.ecr.eu-west-2.amazonaws.com/eks/pause:3.5 --v=2 --streaming-connection-idle-timeout=26492s'
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"clusterDNS": [
"10.100.0.10"
],
"kubeAPIQPS": 10,
"kubeAPIBurst": 20,
"evictionHard": {
"memory.available": "100Mi",
"nodefs.available": "10%",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Service]
Environment='KUBELET_ARGS=--node-ip=192.168.89.216 --pod-infra-container-image=602401143452.dkr.ecr.eu-west-2.amazonaws.com/eks/pause:3.5 --v=2 --read-only-port=0 --streaming-connection-idle-timeout=0 --make-iptables-util-chains=false --event-qps=0'
Environment='KUBELET_ARGS=--node-ip=192.168.6.157 --pod-infra-container-image=602401143452.dkr.ecr.eu-west-2.amazonaws.com/eks/pause:3.5 --v=2 --read-only-port=0 --streaming-connection-idle-timeout=0 --make-iptables-util-chains=false --event-qps=0'
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
"clusterDNS": [
"10.100.0.10"
],
"kubeAPIQPS": 10,
"kubeAPIBurst": 20,
"evictionHard": {
"memory.available": "100Mi",
"nodefs.available": "10%",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
automountServiceAccountToken: false
containers:
- name: busybox
image: 704479110758.dkr.ecr.eu-west-2.amazonaws.com/test-eks-scan-false:latest
image: 391946104644.dkr.ecr.eu-west-2.amazonaws.com/test-eks-scan-false:latest
imagePullPolicy: Always
command:
- sleep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
automountServiceAccountToken: false
containers:
- name: busybox
image: 704479110758.dkr.ecr.eu-west-2.amazonaws.com/test-eks-scan-true:latest
image: 391946104644.dkr.ecr.eu-west-2.amazonaws.com/test-eks-scan-true:latest
imagePullPolicy: Always
command:
- sleep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
image: 704479110758.dkr.ecr.eu-west-2.amazonaws.com/cloudbeat:latest
image: "{{ .Values.cloudbeat.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{.Values.image.pullPolicy}}
name: cloudbeat
resources:
requests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ data:
ES_PASSWORD: "changeme"
ES_HOST: "elasticsearch-master.kube-system"
USE_DOCKER: "false"
{{- range $key, $value := .Values.testData.eksNodes }}
{{ $key }}: {{ $value }}
{{- end }}
MARKER_CMD: {{ .Values.testData.markerCmd}}
TEST_MARKER: {{ .Values.testData.marker }}
{{- if .Values.testData.range }}
Expand Down
2 changes: 1 addition & 1 deletion tests/deploy/k8s-cloudbeat-tests/templates/eks-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: busybox
image: 704479110758.dkr.ecr.eu-west-2.amazonaws.com/test-eks-scan-true:latest
image: "{{ .Values.image.ecr }}/test-eks-scan-true:latest"
imagePullPolicy: IfNotPresent
command:
- sleep
Expand Down
7 changes: 7 additions & 0 deletions tests/deploy/k8s-cloudbeat-tests/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ image:
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
ecr: 391946104644.dkr.ecr.eu-west-2.amazonaws.com

testData:
marker: rules
agentName: cloudbeat
markerCmd: -m
clusterConfig: test-eks-config-1
eksNodes:
EKS_CONFIG_1_NODE_1: "ip-192-168-29-162.eu-west-2.compute.internal"
EKS_CONFIG_1_NODE_2: "ip-192-168-93-227.eu-west-2.compute.internal"
EKS_CONFIG_2_NODE_1: "ip-192-168-33-106.eu-west-2.compute.internal"
EKS_CONFIG_2_NODE_2: "ip-192-168-6-157.eu-west-2.compute.internal"

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -99,6 +105,7 @@ job:

cloudbeat:
deploy: false
repository: 391946104644.dkr.ecr.eu-west-2.amazonaws.com/cloudbeat

cloudbeatEks:
deploy: false
Expand Down
2 changes: 1 addition & 1 deletion tests/deploy/values/ci-eks-config-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ elasticsearch:
storageClassName: gp2

image:
repository: 704479110758.dkr.ecr.eu-west-2.amazonaws.com/cloudbeat-test
repository: 391946104644.dkr.ecr.eu-west-2.amazonaws.com/cloudbeat-test
pullPolicy: Always

cloudbeat:
Expand Down
2 changes: 1 addition & 1 deletion tests/deploy/values/ci-eks-config-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ elasticsearch:
storageClassName: gp2

image:
repository: 704479110758.dkr.ecr.eu-west-2.amazonaws.com/cloudbeat-test
repository: 391946104644.dkr.ecr.eu-west-2.amazonaws.com/cloudbeat-test
pullPolicy: Always

cloudbeat:
Expand Down

0 comments on commit 1015aad

Please sign in to comment.