Skip to content

Commit

Permalink
Add namespace to all the resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Libanori committed Aug 21, 2022
1 parent 342031f commit 7262de4
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/knowage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

apiVersion: v2
name: knowage
version: 1.0.2
version: 1.0.3
kubeVersion: ">= 1.22.0-0"
description: A Helm chart for Kubernetes Suite
type: application
Expand Down
3 changes: 3 additions & 0 deletions charts/knowage/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "knowage.config" . }}
namespace: {{ .Release.Namespace }}
data:
dbHost: {{ include "knowage.db.service" . | quote }}
dbPort: {{ include "knowage.db.port" . | quote }}
Expand Down Expand Up @@ -128,6 +129,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "knowage.proxy.config" . }}
namespace: {{ .Release.Namespace }}
data:
nginx.conf: |
user nginx ;
Expand Down Expand Up @@ -197,6 +199,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "knowage.hazelcast.config" . }}
namespace: {{ .Release.Namespace }}
data:
hazelcast.xml: |
<?xml version="1.0" encoding="UTF-8"?>
Expand Down
10 changes: 9 additions & 1 deletion charts/knowage/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "knowage.proxy.deployment" . }}
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -80,6 +81,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "knowage.deployment" . }}
namespace: {{ .Release.Namespace }}
spec:
serviceName: "knowage-main"
replicas: 1
Expand Down Expand Up @@ -247,6 +249,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "knowage.db.deployment" . }}
namespace: {{ .Release.Namespace }}
spec:
serviceName: "knowage-db"
replicas: 1
Expand Down Expand Up @@ -320,6 +323,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "knowage.cache.deployment" . }}
namespace: {{ .Release.Namespace }}
spec:
serviceName: "knowage-cache-db"
replicas: 1
Expand Down Expand Up @@ -394,6 +398,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "knowage.foodmart.deployment" . }}
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -436,6 +441,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "knowage.python.deployment" . }}
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -490,7 +496,8 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "knowage.r.deployment" . }}
name: {{ include "knowage.r.deployment" . }}z
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -546,6 +553,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "knowage.hazelcast.deployment" . }}
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
Expand Down
3 changes: 2 additions & 1 deletion charts/knowage/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "knowage.ingress" . }}
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
Expand Down Expand Up @@ -55,6 +54,8 @@ metadata:
add_header X-Permitted-Cross-Domain-Policies "none" ;
add_header Content-Security-Policy "default-src 'self'; connect-src 'self' https://login.microsoftonline.com; manifest-src 'self'; object-src 'self'; frame-src 'self' blob: data:; font-src 'self' data:; img-src 'self' blob: data: http://tile.openstreetmap.org http://*.tile.openstreetmap.org http://www.gravatar.com; script-src 'self' 'unsafe-eval' 'unsafe-inline'; script-src-elem 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://alcdn.msauth.net; style-src 'self' 'unsafe-inline'; style-src-elem 'self' 'unsafe-inline'" ;
add_header Referrer-Policy "no-referrer" ;
name: {{ include "knowage.ingress" . }}
namespace: {{ .Release.Namespace }}
spec:
rules:
- host: {{ include "knowage.domain" . }}
Expand Down
3 changes: 3 additions & 0 deletions charts/knowage/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "knowage.pvc" . }}
namespace: {{ .Release.Namespace }}
spec:
accessModes:
- ReadWriteMany
Expand All @@ -52,6 +53,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "knowage.db.pvc" . }}
namespace: {{ .Release.Namespace }}
spec:
accessModes:
- ReadWriteOnce
Expand All @@ -75,6 +77,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "knowage.cache.pvc" . }}
namespace: {{ .Release.Namespace }}
spec:
accessModes:
- ReadWriteOnce
Expand Down
3 changes: 3 additions & 0 deletions charts/knowage/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ include "knowage.db.secret" . }}
namespace: {{ .Release.Namespace }}
type: Opaque
{{ if $secret -}}
data:
Expand All @@ -42,6 +43,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ include "knowage.cache.secret" . }}
namespace: {{ .Release.Namespace }}
type: Opaque
{{ if $secret -}}
data:
Expand All @@ -62,6 +64,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ include "knowage.secret" . }}
namespace: {{ .Release.Namespace }}
type: Opaque
{{ if $secret -}}
data:
Expand Down
8 changes: 8 additions & 0 deletions charts/knowage/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "knowage.proxy.service" . }}
namespace: {{ .Release.Namespace }}
spec:
type: LoadBalancer
selector:
Expand All @@ -54,6 +55,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "knowage.service" . }}
namespace: {{ .Release.Namespace }}
spec:
selector:
knowage-suite.com/app: knowage
Expand Down Expand Up @@ -82,6 +84,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "knowage.db.service" . }}
namespace: {{ .Release.Namespace }}
spec:
{{- if .Values.knowage.deployMetadataDb }}
ports:
Expand Down Expand Up @@ -115,6 +118,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "knowage.cache.service" . }}
namespace: {{ .Release.Namespace }}
spec:
{{- if .Values.knowage.deployCacheDb }}
ports:
Expand Down Expand Up @@ -144,6 +148,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "knowage.foodmart.service" . }}
namespace: {{ .Release.Namespace }}
spec:
selector:
knowage-suite.com/app: foodmart
Expand All @@ -168,6 +173,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "knowage.python.service" . }}
namespace: {{ .Release.Namespace }}
spec:
selector:
knowage-suite.com/app: knowage-python
Expand All @@ -191,6 +197,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "knowage.r.service" . }}
namespace: {{ .Release.Namespace }}
spec:
selector:
knowage-suite.com/app: knowage-r
Expand All @@ -214,6 +221,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "knowage.hazelcast.service" . }}
namespace: {{ .Release.Namespace }}
spec:
selector:
knowage-suite.com/app: hazelcast
Expand Down

0 comments on commit 7262de4

Please sign in to comment.