diff --git a/install-manifests/helm/space-cloud/Chart.yaml b/install-manifests/helm/space-cloud/Chart.yaml index 8b20b1341..d5395222b 100644 --- a/install-manifests/helm/space-cloud/Chart.yaml +++ b/install-manifests/helm/space-cloud/Chart.yaml @@ -1,11 +1,12 @@ +--- apiVersion: v3 name: space-cloud -version: 0.21.5 # Chart version -appVersion: 0.21.5 # Space Cloud version +version: 0.21.5-1 # Chart version +appVersion: 0.21.5 # Space Cloud version description: Helm Chart to install Space Cloud type: application keywords: -- baaS + - baaS home: https://spaceuptech.com/ sources: - https://github.com/spaceuptech/space-cloud/tree/master/install-manifests/helm/space-cloud diff --git a/install-manifests/helm/space-cloud/templates/01-core.yaml b/install-manifests/helm/space-cloud/templates/01-core.yaml index f39f916f5..94d5b5260 100644 --- a/install-manifests/helm/space-cloud/templates/01-core.yaml +++ b/install-manifests/helm/space-cloud/templates/01-core.yaml @@ -1,6 +1,18 @@ ############################################################################################# ################################ Set some global parameters ################################ ############################################################################################# +{{ if .Values.createNamespace }} +apiVersion: v1 +kind: Namespace +metadata: + name: space-cloud + labels: + {{ if .Values.istio.enabled }} + istio-injection: enabled + {{ end }} +--- +{{ end }} +{{ if .Values.istio.enabled }} apiVersion: "security.istio.io/v1beta1" kind: "PeerAuthentication" metadata: @@ -10,13 +22,6 @@ spec: mtls: mode: STRICT --- -apiVersion: v1 -kind: Namespace -metadata: - name: space-cloud - labels: - istio-injection: enabled ---- apiVersion: security.istio.io/v1beta1 kind: AuthorizationPolicy metadata: @@ -24,4 +29,4 @@ metadata: namespace: default spec: {} ---- \ No newline at end of file +{{ end }} \ No newline at end of file diff --git a/install-manifests/helm/space-cloud/templates/02-redis.yaml b/install-manifests/helm/space-cloud/templates/02-redis.yaml index 2ff491ab1..21b099c4b 100644 --- a/install-manifests/helm/space-cloud/templates/02-redis.yaml +++ b/install-manifests/helm/space-cloud/templates/02-redis.yaml @@ -7,6 +7,7 @@ metadata: name: redis namespace: space-cloud --- +{{ if .Values.istio.enabled }} ############################################################################################# ################################### Istio related config ################################### ############################################################################################# @@ -50,6 +51,7 @@ spec: port: number: 6379 --- +{{ end }} ############################################################################################# ##################################### Kubernetes config #################################### ############################################################################################# diff --git a/install-manifests/helm/space-cloud/templates/03-prometheus.yaml b/install-manifests/helm/space-cloud/templates/03-prometheus.yaml index 275cd5e63..34c0d24a9 100644 --- a/install-manifests/helm/space-cloud/templates/03-prometheus.yaml +++ b/install-manifests/helm/space-cloud/templates/03-prometheus.yaml @@ -1,6 +1,7 @@ ############################################################################################# ############################### Service Account and Roles ################################## ############################################################################################# +{{ if .Values.prometheus.enabled }} apiVersion: v1 kind: ServiceAccount metadata: @@ -57,6 +58,7 @@ roleRef: kind: ClusterRole name: prometheus --- +{{ if .Values.istio.enabled }} ############################################################################################# ################################### Istio related config ################################### ############################################################################################# @@ -103,6 +105,7 @@ spec: attempts: 3 perTryTimeout: 60s --- +{{ end }} ############################################################################################# ##################################### Kubernetes config #################################### ############################################################################################# @@ -333,4 +336,5 @@ spec: name: prometheus - name: storage-volume emptyDir: - {} \ No newline at end of file + {} +{{ end }} \ No newline at end of file diff --git a/install-manifests/helm/space-cloud/templates/04-runner.yaml b/install-manifests/helm/space-cloud/templates/04-runner.yaml index 4c62d7f86..323927458 100644 --- a/install-manifests/helm/space-cloud/templates/04-runner.yaml +++ b/install-manifests/helm/space-cloud/templates/04-runner.yaml @@ -54,6 +54,7 @@ roleRef: name: space-cloud-runner apiGroup: rbac.authorization.k8s.io --- +{{ if .Values.istio.enabled }} ############################################################################################# ################################### Istio related config ################################### ############################################################################################# @@ -133,6 +134,7 @@ spec: port: number: 4060 --- +{{ end }} ############################################################################################# ##################################### Kubernetes config #################################### ############################################################################################# @@ -176,7 +178,7 @@ spec: containers: - name: runner command: ["./app", "start"] - image: "{{ .Values.runner.image.name }}:{{ .Chart.Version }}" + image: "{{ .Values.runner.image.name }}:{{ .Chart.AppVersion }}" imagePullPolicy: {{ .Values.runner.image.pullPolicy }} env: - name: "LOG_LEVEL" @@ -207,7 +209,7 @@ spec: memory: {{ .Values.runner.resources.requests.memory }} cpu: {{ .Values.runner.resources.requests.cpu }} --- -apiVersion: autoscaling/v2beta2 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: runner diff --git a/install-manifests/helm/space-cloud/templates/05-gateway.yaml b/install-manifests/helm/space-cloud/templates/05-gateway.yaml index af62ab446..2b239b482 100644 --- a/install-manifests/helm/space-cloud/templates/05-gateway.yaml +++ b/install-manifests/helm/space-cloud/templates/05-gateway.yaml @@ -34,6 +34,7 @@ roleRef: name: space-cloud-gateway apiGroup: rbac.authorization.k8s.io --- +{{ if .Values.istio.enabled }} ############################################################################################# ################################### Istio related config ################################### ############################################################################################# @@ -141,6 +142,7 @@ spec: attempts: 3 perTryTimeout: 60s --- +{{ end }} ############################################################################################# ##################################### Kubernetes config #################################### ############################################################################################# @@ -185,7 +187,7 @@ spec: containers: - name: gateway command: [ "./app", "run" ] - image: "{{ .Values.gateway.image.name }}:{{ .Chart.Version }}" + image: "{{ .Values.gateway.image.name }}:{{ .Chart.AppVersion }}" imagePullPolicy: {{ .Values.gateway.image.pullPolicy }} livenessProbe: exec: @@ -264,7 +266,7 @@ spec: {{ end }} terminationGracePeriodSeconds: 300 --- -apiVersion: autoscaling/v2beta2 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: gateway diff --git a/install-manifests/helm/space-cloud/templates/keda-2.0.0.yaml b/install-manifests/helm/space-cloud/templates/keda-2.0.0.yaml index 6c1c7ee49..862a01634 100644 --- a/install-manifests/helm/space-cloud/templates/keda-2.0.0.yaml +++ b/install-manifests/helm/space-cloud/templates/keda-2.0.0.yaml @@ -7269,4 +7269,4 @@ spec: namespace: keda version: v1beta1 versionPriority: 100 -{{end}} \ No newline at end of file +{{ end }} \ No newline at end of file diff --git a/install-manifests/helm/space-cloud/values.yaml b/install-manifests/helm/space-cloud/values.yaml index 4403e3424..f9a5e3acb 100644 --- a/install-manifests/helm/space-cloud/values.yaml +++ b/install-manifests/helm/space-cloud/values.yaml @@ -5,6 +5,7 @@ clusterId: "default" devMode: "true" # Turn this to false for production mode isKedaEnabled: true # Set this to false to skip installing keda +createNamespace: true admin: username: "admin" # Log in username @@ -79,6 +80,7 @@ redis: # Prometheus service configuration prometheus: + enabled: true image: name: "prom/prometheus" version: "v2.19.0" @@ -106,7 +108,10 @@ dbEvents: memory: "512Mi" cpu: "500m" +istio: + enabled: false + # Connection string used by gateway & runner to connect to other services connections: redisConn: "redis.space-cloud.svc.cluster.local:6379" - prometheusConn: "http://prometheus.space-cloud.svc.cluster.local:9090" \ No newline at end of file + prometheusConn: "http://prometheus.space-cloud.svc.cluster.local:9090"