Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1760a44
Merge pull request #17 from SAP/master
chengshifan May 7, 2021
ad7ef17
Merge pull request #18 from SAP/master
chengshifan Jun 2, 2021
38e1fc9
Merge pull request #19 from SAP/master
chengshifan Jun 7, 2021
8d79a6c
fix e2e test cluster
chengshifan Jun 7, 2021
2eddb5c
replace extensions/v1beta1 with apps/v1 in all deployments template
chengshifan Jun 7, 2021
60c940d
replace all extensions/v1beta1 with apps/v1 in all deployments template
chengshifan Jun 7, 2021
17c1c09
Merge pull request #20 from SAP/master
chengshifan Jul 2, 2021
6be69e1
Merge branch 'SAP:master' into sap_master
chengshifan Jul 2, 2021
3174e20
Merge branch 'sap_master' into fix-e2e-test
chengshifan Jul 2, 2021
df4ea8c
fix aks-service bug
chengshifan Jul 2, 2021
7da60fb
don't use azure-cli 2.25.0
chengshifan Jul 2, 2021
b4354a1
use alpine 3.13 to test
chengshifan Jul 2, 2021
43c6cb8
replace extensions/v1beta1 with apps/v1 in aks-service and gardener-s…
chengshifan Jul 2, 2021
25279ba
use apps/v1 in daemonset
chengshifan Jul 6, 2021
7ea74d3
add selector
chengshifan Jul 6, 2021
0814d66
adding selector in deployment
chengshifan Jul 6, 2021
e3d0712
use new config for gcp service
chengshifan Jul 7, 2021
4b68375
fix postgres version to support k8s 1.16+
chengshifan Jul 7, 2021
81e882a
fix parameters
chengshifan Jul 7, 2021
440cba0
use non-interactive mode
chengshifan Jul 7, 2021
47e7ba6
trigger a new build
chengshifan Jul 7, 2021
ec3d4d6
add test code
chengshifan Jul 8, 2021
5836f43
add test code
chengshifan Jul 8, 2021
bc27a48
increase test time
chengshifan Jul 8, 2021
a999a49
recover test
chengshifan Jul 8, 2021
c778f58
change it to 2700
chengshifan Jul 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion deploy/cluster-status/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-cluster-status
labels:
app: infrabox-cluster-status
spec:
selector:
matchLabels:
app: infrabox-cluster-status
replicas: 3
template:
metadata:
Expand Down
7 changes: 5 additions & 2 deletions deploy/infrabox/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-api
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-api
spec:
selector:
matchLabels:
app: infrabox-api
replicas: {{ default 1 .Values.api.replicas }}
template:
metadata:
Expand Down Expand Up @@ -81,4 +84,4 @@ spec:
{{ include "volumes_gcs" . | indent 16 }}
{{ include "volumes_gerrit" . | indent 16 }}
{{ include "volumes_saml" . | indent 16 }}
{{ include "volumes_dev" . | indent 16 }}
{{ include "volumes_dev" . | indent 16 }}
7 changes: 5 additions & 2 deletions deploy/infrabox/templates/checker/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{{ if or .Values.ha.enabled .Values.monitoring.enabled }}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-checker
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-checker
spec:
selector:
matchLabels:
app: infrabox-checker
replicas: 1
template:
metadata:
Expand Down Expand Up @@ -65,4 +68,4 @@ spec:
{{ include "volumes_rsa" . | indent 16 }}
{{ include "volumes_gcs" . | indent 16 }}
{{ include "volumes_dev" . | indent 16 }}
{{ end }}
{{ end }}
5 changes: 4 additions & 1 deletion deploy/infrabox/templates/docker-registry/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-docker-registry
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-docker-registry
spec:
selector:
matchLabels:
app: infrabox-docker-registry
replicas: {{ required "docker_registry.replicas is required" .Values.docker_registry.replicas }}
template:
metadata:
Expand Down
5 changes: 4 additions & 1 deletion deploy/infrabox/templates/fluentbit/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: infrabox-fluent-bit
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-fluent-bit
spec:
selector:
matchLabels:
app: infrabox-fluent-bit
template:
metadata:
labels:
Expand Down
7 changes: 5 additions & 2 deletions deploy/infrabox/templates/gc/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-gc
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-gc
spec:
selector:
matchLabels:
app: infrabox-gc
replicas: 1
template:
metadata:
Expand All @@ -29,4 +32,4 @@ spec:
{{ include "env_azure" . | indent 16 }}
{{ include "env_swift" . | indent 16 }}
volumes:
{{ include "volumes_database" . | indent 16 }}
{{ include "volumes_database" . | indent 16 }}
2 changes: 1 addition & 1 deletion deploy/infrabox/templates/gerrit/review.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ define "gerrit_review_deployment" }}
{{ if .Values.gerrit.enabled }}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-gerrit-review
Expand Down
2 changes: 1 addition & 1 deletion deploy/infrabox/templates/gerrit/trigger.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ define "gerrit_trigger_deployment" }}
{{ if .Values.gerrit.enabled }}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-gerrit-trigger
Expand Down
5 changes: 4 additions & 1 deletion deploy/infrabox/templates/github/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{{ define "github_deployment" }}
{{ if .Values.github.enabled }}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-github
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-github
spec:
selector:
matchLabels:
app: infrabox-github
replicas: 1
template:
metadata:
Expand Down
5 changes: 4 additions & 1 deletion deploy/infrabox/templates/grafana/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{{ if .Values.monitoring.enabled }}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-grafana
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-grafana
spec:
selector:
matchLabels:
app: infrabox-grafana
replicas: 1
template:
metadata:
Expand Down
5 changes: 4 additions & 1 deletion deploy/infrabox/templates/metrics/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{{ if .Values.monitoring.enabled }}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-metrics
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-metrics
spec:
selector:
matchLabels:
app: infrabox-metrics
replicas: 1
template:
metadata:
Expand Down
5 changes: 4 additions & 1 deletion deploy/infrabox/templates/scheduler/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-scheduler
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-scheduler
spec:
selector:
matchLabels:
app: infrabox-scheduler
replicas: 1
template:
metadata:
Expand Down
5 changes: 4 additions & 1 deletion deploy/infrabox/templates/static/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{{ define "static_deployment" }}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-static
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-static
spec:
selector:
matchLabels:
app: infrabox-static
replicas: 1
template:
metadata:
Expand Down
5 changes: 4 additions & 1 deletion deploy/infrabox/templates/status-cachet/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{{ if .Values.cachet.enabled }}
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: infrabox-status-cachet
namespace: {{ template "system_namespace" . }}
labels:
app: infrabox-status-cachet
spec:
selector:
matchLabels:
app: infrabox-status-cachet
replicas: 1
template:
metadata:
Expand Down
4 changes: 2 additions & 2 deletions infrabox/generator/e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": 1,
"jobs": [{
"type": "docker",
"name": "e2e-k8s-1-15",
"name": "e2e-k8s-1-18",
"docker_file": "infrabox/test/e2e/Dockerfile",
"build_context": "../..",
"build_only": false,
Expand All @@ -24,7 +24,7 @@
"numNodes": 2,
"preemptible": false,
"zone": "us-east1-b",
"clusterVersion": "1.15"
"clusterVersion": "1.18"
}
}]
}]
Expand Down
37 changes: 15 additions & 22 deletions infrabox/test/e2e/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,23 @@ _prepareKubectl() {
SERVICE_NAME="e2e-cluster"

CA_CRT="/var/run/infrabox.net/services/$SERVICE_NAME/ca.crt"
CLIENT_CRT="/var/run/infrabox.net/services/$SERVICE_NAME/client.crt"
CLIENT_KEY="/var/run/infrabox.net/services/$SERVICE_NAME/client.key"

ENDPOINT=$(cat /var/run/infrabox.net/services/$SERVICE_NAME/endpoint)
TOKEN=$(cat /var/run/infrabox.net/services/$SERVICE_NAME/token)

ENDPOINT=$(cat /var/run/infrabox.net/services/$SERVICE_NAME/endpoint)
PASSWORD=$(cat /var/run/infrabox.net/services/$SERVICE_NAME/password)
USERNAME=$(cat /var/run/infrabox.net/services/$SERVICE_NAME/username)
kubectl config set-cluster $SERVICE_NAME \
--server=$ENDPOINT \
--embed-certs=true \
--certificate-authority=$CA_CRT

kubectl config set-cluster $SERVICE_NAME \
--server=$ENDPOINT \
--certificate-authority=$CA_CRT
kubectl config set-credentials admin \
--token=$TOKEN

kubectl config set-credentials admin \
--certificate-authority=$CA_CRT \
--client-certificate=$CLIENT_CRT \
--client-key=$CLIENT_KEY \
--username=$USERNAME \
--password=$PASSWORD
kubectl config set-context default-system \
--cluster=$SERVICE_NAME \
--user=admin

kubectl config set-context default-system \
--cluster=$SERVICE_NAME \
--user=admin

kubectl config use-context default-system
kubectl config use-context default-system

kubectl get nodes

Expand Down Expand Up @@ -93,8 +86,8 @@ _getPodName() {
_installPostgres() {
echo "## Install postgres"
helm install -n postgres stable/postgresql \
--version 1.0.0 \
--set imageTag=9.6.2,postgresPassword=postgres,probes.readiness.periodSeconds=5 \
--version 7.0.0 \
--set postgresqlPassword=postgres,readinessProbe.periodSeconds=5 \
--wait \
--namespace infrabox-system

Expand All @@ -104,7 +97,7 @@ _installPostgres() {
kubectl port-forward -n infrabox-system $postgres_pod 5432 &

# Wait until postgres is ready
until psql -U postgres -h localhost -c '\l'; do
until psql postgresql://postgres:postgres@localhost:5432 -c '\l'; do
>&2 echo "Postgres is unavailable - sleeping"
sleep 1
done
Expand Down
2 changes: 1 addition & 1 deletion src/services/aks/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN dep ensure
RUN chmod +x ./tmp/build.sh
RUN ./tmp/build.sh

FROM alpine:3
FROM alpine:3.13

ENV PATH $PATH:/usr/local/bin

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "infrabox-service-aks.fullname" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ func newCollectorDeployment() *appsv1.Deployment {
return &appsv1.Deployment{
TypeMeta: metav1.TypeMeta{
Kind: "Deployment",
APIVersion: "extensions/v1beta1",
APIVersion: "apps/v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "infrabox-collector-api",
Expand Down Expand Up @@ -752,7 +752,7 @@ func newCollectorDaemonSet() *appsv1.DaemonSet {
return &appsv1.DaemonSet{
TypeMeta: metav1.TypeMeta{
Kind: "DaemonSet",
APIVersion: "extensions/v1beta1",
APIVersion: "apps/v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "infrabox-collector-fluent-bit",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "infrabox-service-gardener.fullname" . }}
Expand Down
4 changes: 2 additions & 2 deletions src/services/gardener/pkg/stub/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ func newCollectorDeployment() *appsv1.Deployment {
return &appsv1.Deployment{
TypeMeta: metav1.TypeMeta{
Kind: "Deployment",
APIVersion: "extensions/v1beta1",
APIVersion: "apps/v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "infrabox-collector-api",
Expand Down Expand Up @@ -632,7 +632,7 @@ func newCollectorDaemonSet() *appsv1.DaemonSet {
return &appsv1.DaemonSet{
TypeMeta: metav1.TypeMeta{
Kind: "DaemonSet",
APIVersion: "extensions/v1beta1",
APIVersion: "apps/v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "infrabox-collector-fluent-bit",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "infrabox-service-namespace.fullname" . }}
Expand Down