Skip to content

Commit

Permalink
add selectors for charts (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
jezpoz authored Feb 5, 2019
1 parent 2b03d86 commit d5091fa
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 67 deletions.
2 changes: 1 addition & 1 deletion deploy/kubernetes/altinncore-loadbalancer-dev-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data:
server {
listen 80;
server_name altinn.studio;
server_name dev.altinn.studio;
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
return 301 https://dev.altinn.studio$request_uri;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: altinn-designer
labels:
app.kubernetes.io/name: {{ include "altinn-designer.name" . }}
helm.sh/chart: {{ include "altinn-designer.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
selector:
matchLabels:
run: altinn-designer
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "altinn-designer.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: altinn-designer
run: altinn-designer
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ required "image.tag not set" .Values.image.tag }}"
ports:
- containerPort: {{ .Values.service.internalPort }}
- containerPort: {{ .Values.image.containerPort }}
{{- if eq (required "evironment not set" .Values.environment) "development"}}
env:
{{- range $variable := .Values.environmentVariables.development }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ kind: Service
metadata:
name: altinn-designer
labels:
app.kubernetes.io/name: {{ include "altinn-designer.name" . }}
helm.sh/chart: {{ include "altinn-designer.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
run: altinn-designer
spec:
ports:
- port: {{ .Values.service.internalPort }}
{{- range $port := .Values.service.ports }}
- port: {{ $port.port }}
targetPort: {{ $port.targetPort }}
protocol: {{ $port.protocol }}
{{- end }}
selector:
app: altinn-designer
run: altinn-designer
5 changes: 4 additions & 1 deletion deploy/kubernetes/helm-charts/altinn-designer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,7 @@ volumes:
secretName: altinn-appsettings-secret

service:
internalPort: 5000
ports:
- port: 5000
protocol: TCP
targetPort: 5000
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: altinn-loadbalancer
labels:
app.kubernetes.io/name: {{ include "altinn-loadbalancer.name" . }}
helm.sh/chart: {{ include "altinn-loadbalancer.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
selector:
matchLabels:
run: altinn-loadbalancer
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
app: altinn-loadbalancer
run: altinn-loadbalancer
spec:
containers:
- name: {{ .Chart.Name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ kind: Service
metadata:
name: altinn-loadbalancer
labels:
app.kubernetes.io/name: {{ include "altinn-loadbalancer.name" . }}
helm.sh/chart: {{ include "altinn-loadbalancer.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
run: altinn-loablanacer
spec:
ports:
- port: {{ .Values.service.ports.http }}
name: http
- port: {{ .Values.service.ports.https }}
name: https
{{- range $port := .Values.service.ports }}
- port: {{ $port.port }}
targetPort: {{ $port.targetPort }}
protocol: {{ $port.protocol }}
name: {{ $port.name }}
{{- end }}
selector:
app: altinn-loadbalancer
run: altinn-loadbalancer
type: {{ .Values.service.type }}
{{- if eq (required ".Values.environment must be set" .Values.environment) "development" }}
loadBalancerIP: "40.113.5.36"
Expand Down
11 changes: 8 additions & 3 deletions deploy/kubernetes/helm-charts/altinn-loadbalancer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ volumes:

service:
type: LoadBalancer
loadBalancerIp:
ports:
http: 80
https: 443
- port: 80
targetPort: 80
protocol: TCP
name: http
- port: 443
targetPort: 443
protocol: TCP
name: https
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: altinn-repositories
labels:
app.kubernetes.io/name: {{ include "altinn-repositories.name" . }}
helm.sh/chart: {{ include "altinn-repositories.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app: altinn-repositories
spec:
selector:
matchLabels:
run: altinn-repositories
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
app: altinn-repositories
run: altinn-repositories
spec:
containers:
- name: {{ .Chart.Name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ kind: Service
metadata:
name: altinn-repositories
labels:
app.kubernetes.io/name: {{ include "altinn-repositories.name" . }}
helm.sh/chart: {{ include "altinn-repositories.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
run: altinn-repositories
spec:
ports:
- port: {{ .Values.service.internalPort }}
{{- range $port := .Values.service.ports}}
- port: {{ $port.port }}
targetPort: {{ $port.targetPort }}
protocol: {{ $port.protocol }}
{{- end }}
selector:
app: altinn-repositories
run: altinn-repositories
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@ volumes:
claimName: altinn-storage-gitea-volume-claim

service:
internalPort: 3000
ports:
- port: 3000
targetPort: 3000
protocol: TCP
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: altinn-runtime
labels:
app.kubernetes.io/name: {{ include "altinn-runtime.name" . }}
helm.sh/chart: {{ include "altinn-runtime.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
selector:
matchLabels:
run: altinn-runtime
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "altinn-runtime.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: altinn-runtime
run: altinn-runtime
spec:
containers:
- name: {{ .Chart.Name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ kind: Service
metadata:
name: altinn-runtime
labels:
app.kubernetes.io/name: {{ include "altinn-runtime.name" . }}
helm.sh/chart: {{ include "altinn-runtime.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
run: altinn-runtime
spec:
ports:
- port: {{ .Values.service.internalPort }}
{{- range $port := .Values.service.ports }}
- port: {{ $port.port }}
targetPort: {{ $port.targetPort }}
protocol: {{ $port.protocol }}
{{- end }}
selector:
app: altinn-runtime
run: altinn-runtime
5 changes: 4 additions & 1 deletion deploy/kubernetes/helm-charts/altinn-runtime/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ volumes:
secretName: altinn-appsettings-secret

service:
internalPort: 5005
ports:
- port: 5005
targetPort: 5005
protocol: TCP

0 comments on commit d5091fa

Please sign in to comment.