Skip to content

Commit 20a6553

Browse files
authored
Merge pull request #475 from StatCan/fdi-merge-2015-01
Fdi merge 2015 01
2 parents 259477a + 151b491 commit 20a6553

17 files changed

+649
-1
lines changed

stable/fdi-fmr-chart

-1
This file was deleted.

stable/fdi-fmr-chart/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

stable/fdi-fmr-chart/Chart.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: v2
2+
name: fdi-fmr-chart
3+
description: fusionsuite
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 1.0.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
appVersion: 1.16.0
24+
25+
home: https://statcan.gc.ca
26+
sources:
27+
- https://repo.private.example.ca/analytics-platform/discovery/fusionsuite-docker-compose
28+
maintainers:
29+
- name: sylus
30+
31+
- name: Zachary Seguin
32+
33+
engine: gotpl
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dependencies:
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
1. Application URL for Authz:
2+
3+
{{- if .Values.fusionapps.ingress.enabled }}
4+
5+
{{- range $host := .Values.fusionapps.ingress.hosts }}
6+
7+
{{- range .paths }}
8+
http{{ if $.Values.fusionapps.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
9+
{{- end }}
10+
11+
{{- end }}
12+
13+
{{- else if contains "NodePort" .Values.fusionapps.service.type }}
14+
15+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "fusionsuite.fullname" . }})
16+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
17+
echo http://$NODE_IP:$NODE_PORT
18+
19+
{{- else if contains "LoadBalancer" .Values.fusionapps.service.type }}
20+
21+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
22+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "fusionsuite.fullname" . }}'
23+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "fusionsuite.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
24+
echo http://$SERVICE_IP:{{ .Values.fusionapps.service.port }}
25+
26+
{{- else if contains "ClusterIP" .Values.fusionapps.service.type }}
27+
28+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "fusionsuite.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
29+
echo "Visit http://127.0.0.1:8080 to use your application"
30+
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:8080
31+
32+
{{- end }}
33+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "fusionsuite.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
7+
{{- end }}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "fusionsuite.fullname" -}}
15+
{{- if .Values.fullnameOverride }}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
17+
{{- else }}
18+
{{- $name := default .Chart.Name .Values.nameOverride }}
19+
{{- if contains $name .Release.Name }}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
21+
{{- else }}
22+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
23+
{{- end }}
24+
{{- end }}
25+
{{- end }}
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "fusionsuite.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
32+
{{- end }}
33+
34+
{{/*
35+
Common labels
36+
*/}}
37+
{{- define "fusionsuite.labels" -}}
38+
helm.sh/chart: {{ include "fusionsuite.chart" . }}
39+
{{ include "fusionsuite.selectorLabels" . }}
40+
{{- if .Chart.AppVersion }}
41+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
42+
{{- end }}
43+
app.kubernetes.io/managed-by: {{ .Release.Service }}
44+
{{- end }}
45+
46+
{{/*
47+
Selector labels
48+
*/}}
49+
{{- define "fusionsuite.selectorLabels" -}}
50+
app.kubernetes.io/name: {{ include "fusionsuite.name" . }}
51+
app.kubernetes.io/instance: {{ include "fusionsuite.name" . }}
52+
{{- end }}
53+
54+
{{/*
55+
Create the name of the service account to use
56+
*/}}
57+
{{- define "fusionsuite.fusionapps.serviceAccountName" -}}
58+
{{- if .Values.fusionapps.serviceAccount.create }}
59+
{{- default (include "fusionsuite.fullname" .) .Values.fusionapps.serviceAccount.name }}
60+
{{- else }}
61+
{{- default "default" .Values.fusionapps.serviceAccount.name }}
62+
{{- end }}
63+
{{- end }}
64+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
kind: ConfigMap
2+
apiVersion: v1
3+
metadata:
4+
name: {{ include "fusionsuite.fullname" . }}-registry
5+
data:
6+
fmr.properties: |
7+
database.dialect={{ .Values.managed.registry.db_dialect }}
8+
database.driver={{ .Values.managed.registry.db_driver }}
9+
database.password={{ .Values.managed.registry.db_password }}
10+
database.url=jdbc\:{{ .Values.managed.registry.db_jdbc_type }}\://{{ .Values.managed.registry.mssql_host }}\:{{ .Values.managed.registry.mssql_port }};databaseName\={{ .Values.managed.registry.db_name }}
11+
database.useCustomString=false
12+
database.username={{ .Values.managed.registry.db_username }}
13+
encrypt.password ={{ .Values.managed.registry.encrypt_password }}
14+
encrypt.salt ={{ .Values.managed.registry.encrypt_salt }}
15+
security.password ={{ .Values.managed.registry.security_password }}
16+
security.username ={{ .Values.managed.registry.security_username }}
17+
fwb_config.json: |
18+
{
19+
"Properties": {
20+
"server.url": "https://{{ .Values.managed.host }}/fwb"
21+
},
22+
"Environments": [
23+
{{- range $key, $value := .Values.fwb }}
24+
{
25+
"id": {{ $key | quote }},
26+
"name": {{ $value.name | quote }},
27+
"api": {
28+
"query": {{ $value.api.query | quote }},
29+
{{- if $value.api.delete }}
30+
"delete": {{ $value.api.delete | quote }},
31+
{{- end }}
32+
{{- if $value.api.persist | quote }}
33+
"persist": {{ $value.api.persist | quote }},
34+
{{- end }}
35+
"version": {{ $value.api.version | quote }}
36+
},
37+
"auth": {{ $value.auth | quote }},
38+
{{- if $value.oidc }}
39+
"oidc": {
40+
"config": {{ $value.oidc.config | quote }},
41+
"clientId": {{ $value.oidc.clientId | quote }}
42+
{{- if $value.oidc.scope }}
43+
"scope": {{ $value.oidc.scope | quote }}
44+
{{- end }}
45+
},
46+
{{- end }}
47+
"locale": [{{ $value.locale }}],
48+
{{- if $value.agencies }}
49+
"agencies": [{{ $value.agencies }}],
50+
{{- end }}
51+
"format": {{ $value.format | quote }}
52+
},
53+
{{- end }}
54+
]
55+
}
56+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
kind: ConfigMap
2+
apiVersion: v1
3+
metadata:
4+
name: {{ include "fusionsuite.fullname" . }}-security
5+
data:
6+
fusion-security.properties: |
7+
######################################################################
8+
# DATABASE CONNECTION #
9+
######################################################################
10+
database.security.dialect={{ .Values.managed.security.db_dialect }}
11+
database.security.driver={{ .Values.managed.security.db_driver }}
12+
database.security.username={{ .Values.managed.security.db_username }}
13+
database.security.password={{ .Values.managed.security.db_password }}
14+
database.security.url=jdbc:{{ .Values.managed.security.db_jdbc_type }}://{{ .Values.managed.security.mssql_host }}:{{ .Values.managed.security.mssql_port }};databaseName\={{ .Values.managed.security.db_name }};
15+
#database.security.url=jdbc:sqlserver://dotstatsuite.database.windows.net:1433;databaseName\={{ .Values.managed.security.db_name }}
16+
######################################################################
17+
# SECURITY (HTTPS PORT REDIRECTION) #
18+
######################################################################
19+
#Auto Redirect to http:
20+
# any - do not auto redirect
21+
# https - auto redirect traffic coming in on http to https, requires port mapping information to be correct
22+
requires.channel=any
23+
24+
#Only required if requires.channel=https
25+
port.http=8080
26+
port.https=8444
27+
28+
######################################################################
29+
# CERTIFICATE AUTHENTICATION #
30+
######################################################################
31+
security.p12File=
32+
security.p12Pass=
33+
34+
######################################################################
35+
# EMAIL SERVER #
36+
######################################################################
37+
mail.smtp={{ .Values.managed.smtp.host }}
38+
mail.port={{ .Values.managed.smtp.port }}
39+
mail.username={{ .Values.managed.smtp.username }}
40+
mail.password={{ .Values.managed.smtp.password }}
41+
mail.security=TLS
42+
#mail.starttls.enable={{ .Values.managed.smtp.enableSsl }}
43+
mail.from={{ .Values.managed.smtp.mailFrom }}
44+
45+
######################################################################
46+
# PASSWORD RULES #
47+
######################################################################
48+
security.password.timeouthours=2
49+
security.password.disallowed=
50+
security.password.minlength=1
51+
security.password.minnum=-1
52+
security.password.minchar=-1
53+
security.password.minlower=-1
54+
security.password.minupper=-1
55+
security.password.illegalchars=
56+
max.login.attempt=3
57+
{{- if .Values.fusionapps.ingress.enabled -}}
58+
{{- range .Values.fusionapps.ingress.hosts }}
59+
######################################################################
60+
# STRUCTURE WEB SERVICE (ORGANISATION RETRIEVAL) #
61+
######################################################################
62+
structure.ws=CloudRegistry@https://{{ .host }}/FusionRegistry
63+
64+
######################################################################
65+
# GENERAL SETTINGS #
66+
######################################################################
67+
server.url=https://{{ .host }}/FusionSecurity
68+
{{- end }}
69+
{{ else }}
70+
######################################################################
71+
# STRUCTURE WEB SERVICE (ORGANISATION RETRIEVAL) #
72+
######################################################################
73+
structure.ws=CloudRegistry@https://{{ .Values.managed.host }}:{{ .Values.managed.port }}/FusionRegistry
74+
75+
######################################################################
76+
# GENERAL SETTINGS #
77+
######################################################################
78+
server.url=https://{{ .Values.managed.host }}:{{ .Values.managed.port }}/FusionSecurity
79+
80+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{{- if .Values.fusionapps.enabled -}}
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: {{ include "fusionsuite.fullname" . }}-fusionapps
6+
labels:
7+
{{- include "fusionsuite.labels" . | nindent 4 }}-fusionapps
8+
spec:
9+
{{- if not .Values.fusionapps.autoscaling.enabled }}
10+
replicas: {{ .Values.fusionapps.replicaCount }}
11+
{{- end }}
12+
selector:
13+
matchLabels:
14+
{{- include "fusionsuite.selectorLabels" . | nindent 6 }}-fusionapps
15+
template:
16+
metadata:
17+
annotations:
18+
traffic.sidecar.istio.io/excludeOutboundPorts: '1433'
19+
{{- with .Values.fusionapps.podAnnotations }}
20+
{{- toYaml . | nindent 8 }}
21+
{{- end }}
22+
labels:
23+
{{- include "fusionsuite.selectorLabels" . | nindent 8 }}-fusionapps
24+
spec:
25+
{{- with .Values.fusionapps.imagePullSecrets }}
26+
imagePullSecrets:
27+
{{- toYaml . | nindent 8 }}
28+
{{- end }}
29+
serviceAccountName: {{ include "fusionsuite.fusionapps.serviceAccountName" . }}-fusionapps
30+
securityContext:
31+
{{- toYaml .Values.fusionapps.podSecurityContext | nindent 8 }}
32+
containers:
33+
- name: {{ include "fusionsuite.fullname" . }}-fusionapps
34+
securityContext:
35+
{{- toYaml .Values.fusionapps.securityContext | nindent 12 }}
36+
image: "{{ .Values.fusionapps.image.repository }}:{{ .Values.fusionapps.image.tag | default .Chart.AppVersion }}"
37+
imagePullPolicy: {{ .Values.fusionapps.image.pullPolicy }}
38+
env:
39+
- name: TOMCAT_PASSWORD
40+
valueFrom:
41+
secretKeyRef:
42+
name: {{ include "fusionsuite.fullname" . }}-tomcat-password
43+
key: password
44+
- name: TOMCAT_USERNAME
45+
value: {{ .Values.managed.tomcat.tomcat_username }}
46+
ports:
47+
- name: http
48+
containerPort: 8080
49+
protocol: TCP
50+
volumeMounts:
51+
- name: {{ include "fusionsuite.fullname" . }}-registry
52+
mountPath: /opt/bitnami/tomcat/MetadataTechnology/FusionRegistry
53+
- name: {{ include "fusionsuite.fullname" . }}-security
54+
mountPath: /opt/bitnami/tomcat/FusionSecurity
55+
resources:
56+
{{- toYaml .Values.fusionapps.resources | nindent 12 }}
57+
{{- with .Values.fusionapps.nodeSelector }}
58+
nodeSelector:
59+
{{- toYaml . | nindent 8 }}
60+
{{- end }}
61+
{{- with .Values.fusionapps.affinity }}
62+
affinity:
63+
{{- toYaml . | nindent 8 }}
64+
{{- end }}
65+
{{- with .Values.fusionapps.tolerations }}
66+
tolerations:
67+
{{- toYaml . | nindent 8 }}
68+
{{- end }}
69+
volumes:
70+
- name: {{ include "fusionsuite.fullname" . }}-security
71+
configMap:
72+
name: {{ include "fusionsuite.fullname" . }}-security
73+
- name: {{ include "fusionsuite.fullname" . }}-registry
74+
configMap:
75+
name: {{ include "fusionsuite.fullname" . }}-registry
76+
{{- end -}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{- if .Values.destinationRule.enabled }}
2+
apiVersion: networking.istio.io/v1alpha3
3+
kind: DestinationRule
4+
metadata:
5+
name: {{ template "fusionsuite.fullname" . }}
6+
labels:
7+
app: {{ template "fusionsuite.name" . }}
8+
chart: {{ template "fusionsuite.chart" . }}
9+
release: {{ .Release.Name }}
10+
heritage: {{ .Release.Service }}
11+
spec:
12+
host: "*.{{ .Release.Namespace }}.svc.{{ default "cluster.local" .Values.clusterDomain }}"
13+
trafficPolicy:
14+
tls:
15+
mode: "{{ default "DISABLE" .Values.destinationRule.mode }}"
16+
{{- end }}

0 commit comments

Comments
 (0)