Skip to content

Commit f912e46

Browse files
authored
Fix cluster installation with kyma-installer (#1215)
1 parent 32e673c commit f912e46

File tree

4 files changed

+119
-4
lines changed

4 files changed

+119
-4
lines changed
+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: kyma-installer
6+
---
7+
apiVersion: v1
8+
kind: LimitRange
9+
metadata:
10+
name: kyma-default
11+
namespace: kyma-installer
12+
spec:
13+
limits:
14+
- max:
15+
memory: 1024Mi # Maximum memory that a container can request
16+
default:
17+
# If a container does not specify memory limit, this default value will be applied.
18+
# If a container tries to allocate more memory, container will be OOM killed.
19+
memory: 96Mi
20+
defaultRequest:
21+
# If a container does not specify memory request, this default value will be applied.
22+
# The scheduler considers this value when scheduling a container to a node.
23+
# If a node has not enough memory, such pod will not be created.
24+
memory: 32Mi
25+
type: Container
26+
---
27+
apiVersion: v1
28+
kind: ResourceQuota
29+
metadata:
30+
name: kyma-default
31+
namespace: kyma-installer
32+
spec:
33+
hard:
34+
# The sum of all pod memory requests must not exceed this value.
35+
requests.memory: 384Mi
36+
37+
# The sum of all pod memory limit must not exceed this value.
38+
limits.memory: 512Gi
39+
---
40+
apiVersion: apiextensions.k8s.io/v1beta1
41+
kind: CustomResourceDefinition
42+
metadata:
43+
name: installations.installer.kyma-project.io
44+
spec:
45+
group: installer.kyma-project.io
46+
version: v1alpha1
47+
scope: Namespaced
48+
names:
49+
kind: Installation
50+
singular: installation
51+
plural: installations
52+
shortNames: ['installation']
53+
---
54+
apiVersion: apiextensions.k8s.io/v1beta1
55+
kind: CustomResourceDefinition
56+
metadata:
57+
name: releases.release.kyma-project.io
58+
spec:
59+
group: release.kyma-project.io
60+
version: v1alpha1
61+
scope: Namespaced
62+
names:
63+
kind: Release
64+
singular: release
65+
plural: releases
66+
shortNames: ['release']
67+
---
68+
apiVersion: v1
69+
kind: ServiceAccount
70+
metadata:
71+
name: kyma-installer
72+
namespace: kyma-installer
73+
---
74+
apiVersion: extensions/v1beta1
75+
kind: Deployment
76+
metadata:
77+
name: kyma-installer
78+
namespace: kyma-installer
79+
spec:
80+
template:
81+
metadata:
82+
labels:
83+
name: kyma-installer
84+
spec:
85+
serviceAccountName: kyma-installer
86+
containers:
87+
- name: kyma-installer-container
88+
image: eu.gcr.io/kyma-project/develop/kyma-installer:63f27f76
89+
imagePullPolicy: IfNotPresent
90+
---
91+
kind: ClusterRole
92+
apiVersion: rbac.authorization.k8s.io/v1beta1
93+
metadata:
94+
name: kyma-installer-reader
95+
rules:
96+
- apiGroups: ["*"]
97+
resources: ["*"]
98+
verbs: ["*"]
99+
---
100+
kind: ClusterRoleBinding
101+
apiVersion: rbac.authorization.k8s.io/v1beta1
102+
metadata:
103+
name: kyma-installer
104+
subjects:
105+
- kind: ServiceAccount
106+
name: kyma-installer
107+
namespace: kyma-installer
108+
roleRef:
109+
apiGroup: rbac.authorization.k8s.io
110+
kind: ClusterRole
111+
name: kyma-installer-reader

installation/resources/installer.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ spec:
8585
serviceAccountName: kyma-installer
8686
containers:
8787
- name: kyma-installer-container
88-
image: eu.gcr.io/kyma-project/develop/kyma-installer:63f27f76
88+
image: eu.gcr.io/kyma-project/develop/installer:9da43968
8989
imagePullPolicy: IfNotPresent
9090
---
9191
kind: ClusterRole

installation/scripts/extract-kyma-installer-image.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -o errexit
44

55
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
66
ROOT_DIR="${CURRENT_DIR}/../.."
7-
INSTALLER_YAML_PATH="${ROOT_DIR}/installation/resources/installer.yaml"
7+
INSTALLER_YAML_PATH="${ROOT_DIR}/installation/resources/installer-local.yaml"
88

99
if [ -f $INSTALLER_YAML_PATH ]; then
1010
VERSION=$(grep "image: " $INSTALLER_YAML_PATH | cut -d":" -f2-)

installation/scripts/installer.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ do
1111

1212
case ${key} in
1313
--local)
14-
LOCAL=true
14+
LOCAL=1
1515
shift
1616
;;
1717
--cr)
@@ -37,7 +37,11 @@ kubectl apply -f ${CURRENT_DIR}/../resources/default-sa-rbac-role.yaml
3737

3838
bash ${CURRENT_DIR}/install-tiller.sh
3939

40-
kubectl apply -f ${CURRENT_DIR}/../resources/installer.yaml
40+
if [ $LOCAL ]; then
41+
kubectl apply -f ${CURRENT_DIR}/../resources/installer-local.yaml
42+
else
43+
kubectl apply -f ${CURRENT_DIR}/../resources/installer.yaml
44+
fi
4145

4246
${CURRENT_DIR}/is-ready.sh kube-system k8s-app kube-dns
4347

0 commit comments

Comments
 (0)