Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
- Added ISTIO charts
- Upated charts to reflect stage
- Minor fixes
  • Loading branch information
varmoh committed May 3, 2024
1 parent 79f81d5 commit bb84335
Show file tree
Hide file tree
Showing 54 changed files with 497 additions and 212 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
/tmp
rit-tst-1.yaml
/Kubernetes/__pycache__
/Kubernetes/deploy-kube.sh
/Kubernetes/deploy-kube.sh
/Kubernetes/Components/TIM/values.yaml
2 changes: 1 addition & 1 deletion Docker/Chat+Backoffice/byk.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- security.allowlist.jwt=byk-public-ruuter,byk-private-ruuter,byk-dmapper,byk-widget,byk-customer-service,byk-resql
- spring.datasource.url=jdbc:postgresql://tim-postgresql:5432/tim
- spring.datasource.username=tim
- spring.datasource.password=123
- spring.datasource.password=t9n5Kmm7vP9
- security.oauth2.client.client-id=tara_client_id
- security.oauth2.client.client-secret=tara_client_secret
- security.oauth2.client.registered-redirect-uri=https://tim.byk.buerokratt.ee/authenticate
Expand Down
6 changes: 3 additions & 3 deletions Docker/Chat+Backoffice/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
context: .
network: host
environment:
- ruuter.cors.allowedOrigins=http://test.buerokratt.ee:3000
- ruuter.cors.allowedOrigins=http://stage.buerokratt.ee:3000
volumes:
- ./private.DSL:/DSL
ports:
Expand Down Expand Up @@ -87,7 +87,7 @@ services:
# command: ["postgres", "-c", "ssl=on", "-c", "ssl_cert_file=/etc/tls/tls.crt", "-c", "ssl_key_file=/etc/tls/tls.key"]
environment:
- POSTGRES_USER=tim
- POSTGRES_PASSWORD=123
- POSTGRES_PASSWORD=t9n5Kmm7vP9
- POSTGRES_DB=tim
volumes:
# - ./tim-db/cert.crt:/etc/tls/tls.crt
Expand All @@ -104,7 +104,7 @@ services:
# command: ["postgres", "-c", "ssl=on", "-c", "ssl_cert_file=/etc/tls/tls.crt", "-c", "ssl_key_file=/etc/tls/tls.key"]
environment:
- POSTGRES_USER=byk
- POSTGRES_PASSWORD=01234
- POSTGRES_PASSWORD=PASSWORD
- POSTGRES_DB=byk
volumes:
# - ./users-db/cert.crt:/etc/tls/tls.crt
Expand Down
2 changes: 1 addition & 1 deletion Kubernetes/Components/Bot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

domain: test.buerokratt.ee # Domain name
domain: stage.buerokratt.ee # Domain name

ingress:
certIssuerName: letsencrypt-prod # Change this if your certIssuerName has set up different
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: "{{ .Values.release_name }}"
spec:
host: "{{ .Values.release_name }}"
subsets:
- name: "{{ .Values.release_name }}"
labels:
app: "{{ .Values.release_name }}"
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: "{{ .Values.release_name }}"
spec:
hosts:
- "{{ .Values.release_name }}"
http:
- name: allow
match:
- sourceLabels:
app: component-byk-ruuter
- sourceLabels:
app: component-byk-ruuter-private
route:
- destination:
host: "{{ .Values.release_name }}"
subset: "{{ .Values.release_name }}"
- name: reject
route:
- destination:
host: "{{ .Values.release_name }}"
subset: "{{ .Values.release_name }}"
fault:
abort:
percentage:
value: 100.0
httpStatus: 403
2 changes: 1 addition & 1 deletion Kubernetes/Components/DataMapper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

domain: test.buerokratt.ee # Domain name
domain: stage.buerokratt.ee # Domain name

ingress:
certIssuerName: letsencrypt-prod # Change this if your certIssuerName has set up different
Expand Down
6 changes: 3 additions & 3 deletions Kubernetes/Components/Databases/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

domain: test.buerokratt.ee # Domain name
domain: stage.buerokratt.ee # Domain name
releaseName: "component-databases"

ingress:
Expand All @@ -27,7 +27,7 @@ tim-postgresql:
auth:
postgresPassword: postgres
username: tim
password: "123" # Change password accordingly, make sure that ths passord you set here, will be used inside values.yaml under component TIM values.yaml
password: "t9n5Kmm7vP9" # Change password accordingly, make sure that ths passord you set here, will be used inside values.yaml under component TIM values.yaml
database: tim
statefulset:
enabled: true
Expand All @@ -41,7 +41,7 @@ users-db:
auth:
postgresPassword: postgres
username: byk
password: "01234" # Change password accordingly, make sure that ths passord you set here, will be used inside values.yaml in components and modules, where necessary.
password: "PASSWORD" # Change password accordingly, make sure that ths passord you set here, will be used inside values.yaml in components and modules, where necessary.
database: byk
statefulset:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, PUT, DELETE, OPTIONS"
nginx.ingress.kubernetes.io/cors-allow-headers: "Origin, X-Requested-With, Content-Type, Cache-Control, Connection, Accept"
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
cert-manager.io/cluster-issuer: letsencrypt-prod
labels:
name: "{{ .Values.release_name }}-ingress"
spec:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: "{{ .Values.release_name }}"
spec:
host: "{{ .Values.release_name }}"
subsets:
- name: "{{ .Values.release_name }}"
labels:
app: "{{ .Values.release_name }}"
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: "{{ .Values.release_name }}"
spec:
hosts:
- "{{ .Values.release_name }}"
http:
- name: allow
match:
- sourceLabels:
app: component-byk-ruuter
- sourceLabels:
app: component-byk-ruuter-private
route:
- destination:
host: "{{ .Values.release_name }}"
subset: "{{ .Values.release_name }}"
- name: reject
route:
- destination:
host: "{{ .Values.release_name }}"
subset: "{{ .Values.release_name }}"
fault:
abort:
percentage:
value: 100.0
httpStatus: 403
4 changes: 2 additions & 2 deletions Kubernetes/Components/Notification-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

domain: test.buerokratt.ee # Domain name
secretname: ruuter.test.buerokratt.ee1904prod # Cert name value, change this as suited to environment
domain: stage.buerokratt.ee # Domain name
secretname: ruuter.stage.buerokratt.ee3004prod # Cert name value, change this as suited to environment

ingress:
certIssuerName: letsencrypt-prod # Change this if your certIssuerName has set up different
Expand Down
2 changes: 1 addition & 1 deletion Kubernetes/Components/OpenSearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

domain: test.buerokratt.ee # Domain name
domain: stage.buerokratt.ee # Domain name

ingress:
certIssuerName: letsencrypt-prod # Change this if your certIssuerName has set up different
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data:
ANALYTICS_TIM=http://component-byk-tim:8085
ANALYTICS_DMAPPER=http://component-byk-dmapper:3000
ANALYTICS_RUUTER=http://component-byk-ruuter-private:8080
ANALYTICS_RESQL=http://component-byk-resql:8082
ANALYTICS_RESQL=http://component-byk-resql:8082/analytics
TRAINING_TIM=http://component-byk-tim:8085
TRAINING_DMAPPER=http://component-byk-dmapper-v1:3000
TRAINING_RUUTER=http://component-byk-ruuter-private:8080/training
Expand All @@ -28,4 +28,4 @@ data:
SERVICE_RESQL=http://component-byk-resql:8082/services
SERVICE_TRAINING_RESQL=http://component-byk-resql:8082/services/training
TRAINING_OPENSEARCH=http://component-opensearch-node:9200
DOMAIN=test.buerokratt.ee
DOMAIN=stage.buerokratt.ee
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ spec:
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 21
initialDelaySeconds: 25
periodSeconds: 10
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 22
initialDelaySeconds: 23
periodSeconds: 10

volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ metadata:
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/enable-cors: "true"
# nginx.ingress.kubernetes.io/cors-allow-methods: "POST, GET, OPTIONS"
# nginx.ingress.kubernetes.io/cors-allow-headers: "X-Forwarded-For"
nginx.ingress.kubernetes.io/cors-allow-origin: "https://admin.test.buerokratt.ee, https://test.buerokratt.ee, https://tim.test.buerokratt.ee, https://admin.dev.buerokratt.ee, https://ruuter.test.buerokratt.ee/, https://ruuter.test.buerokratt.ee/v1/private/"
nginx.ingress.kubernetes.io/cors-allow-methods: "POST, GET, OPTIONS"
nginx.ingress.kubernetes.io/cors-allow-headers: "X-Forwarded-For"
nginx.ingress.kubernetes.io/cors-allow-origin: "https://admin.stage.buerokratt.ee, https://stage.buerokratt.ee, https://tim.stage.buerokratt.ee, https://admin.dev.buerokratt.ee, https://ruuter.stage.buerokratt.ee/, https://ruuter.stage.buerokratt.ee/v2/private/, https://ruuter.stage.buerokratt.ee/v2/public"
# nginx.ingress.kubernetes.io/session-cookie-domain: "buerokratt.ee"
# nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
# nginx.ingress.kubernetes.io/additional-response-headers: "Access-Control-Allow-Headers: Content-Type"
nginx.ingress.kubernetes.io/additional-response-headers: "Access-Control-Allow-Headers: Content-Type"
nginx.ingress.kubernetes.io/cors-allow-headers: "content-type"
# nginx.ingress.kubernetes.io/proxy-set-header: "Content-Type: application/json"
nginx.ingress.kubernetes.io/cors-expose-headers: "X-B3-TraceId"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: "{{ .Values.release_name }}"
spec:
host: "{{ .Values.release_name }}"
subsets:
- name: "{{ .Values.release_name }}"
labels:
app: "{{ .Values.release_name }}"
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: "{{ .Values.release_name }}"
spec:
hosts:
- "{{ .Values.release_name }}"
http:
- name: allow
match:
- sourceLabels:
app: "{{ .Values.release_name }}"
route:
- destination:
host: "{{ .Values.release_name }}"
subset: "{{ .Values.release_name }}"
- name: reject
route:
- destination:
host: "{{ .Values.release_name }}"
subset: "{{ .Values.release_name }}"
fault:
abort:
percentage:
value: 100.0
httpStatus: 403
8 changes: 4 additions & 4 deletions Kubernetes/Components/Private-Ruuter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

domain: test.buerokratt.ee # Domain name
secretname: ruuter.test.buerokratt.ee1904prod # Cert name value, change this as suited to environment
domain: stage.buerokratt.ee # Domain name
secretname: ruuter.stage.buerokratt.ee3004prod # Cert name value, change this as suited to environment

ingress:
certIssuerName: letsencrypt-prod # Change this if your certIssuerName has set up different
Expand All @@ -35,7 +35,7 @@ images:
analytics:
registry: "ghcr.io"
repository: "buerokratt/buerokratt-dsl"
tag: "analytics-module-pre-alpha-1.4.7" # Images (tags) are up to date, currently no changes needed
tag: "analytics-module-pre-alpha-1.4.9" # Images (tags) are up to date, currently no changes needed
services:
registry: "ghcr.io"
repository: "buerokratt/buerokratt-dsl"
Expand All @@ -49,5 +49,5 @@ env:
LOG_LEVEL_TIMING: "INFO"
APPLICATION_LOGGING_DISPLAY_REQUEST_CONTENT: "true"
APPLICATION_LOGGING_DISPLAY_RESPONSE_CONTENT: "true"
APPLICATION_CORS_ALLOWED_ORIGINS: https://admin.test.buerokratt.ee # Change the domain name, leave subdomain and subpath same
APPLICATION_CORS_ALLOWED_ORIGINS: https://admin.stage.buerokratt.ee, https://stage.buerokratt.ee, https://tim.stage.buerokratt.ee, https://ruuter.stage.buerokratt.ee # Change the domain name, leave subdomain and subpath same
APPLICATION_OPENSEARCH_CONFIGURATION_URL: http://component-opensearch-node:9200
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ spec:
httpGet:
path: /datasources
port: 8082
initialDelaySeconds: 68
initialDelaySeconds: 70
periodSeconds: 10

volumes:
Expand Down
39 changes: 39 additions & 0 deletions Kubernetes/Components/Resql/templates/istio-setup-byk-resql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: "{{ .Values.release_name }}"
spec:
host: "{{ .Values.release_name }}"
subsets:
- name: "{{ .Values.release_name }}"
labels:
app: "{{ .Values.release_name }}"
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: "{{ .Values.release_name }}"
spec:
hosts:
- "{{ .Values.release_name }}"
http:
- name: allow
match:
- sourceLabels:
app: component-byk-ruuter
- sourceLabels:
app: component-byk-ruuter-private
route:
- destination:
host: "{{ .Values.release_name }}"
subset: "{{ .Values.release_name }}"
- name: reject
route:
- destination:
host: "{{ .Values.release_name }}"
subset: "{{ .Values.release_name }}"
fault:
abort:
percentage:
value: 100.0
httpStatus: 403
4 changes: 2 additions & 2 deletions Kubernetes/Components/Resql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

domain: test.buerokratt.ee # Domain name
domain: stage.buerokratt.ee # Domain name

#ingress:
# tlsConfigMapName: byk-tls-configmap
Expand Down Expand Up @@ -52,5 +52,5 @@ env:
SQLMS_DATASOURCES_0_NAME: "byk"
SQLMS_DATASOURCES_0_JDBCURL: "jdbc:postgresql://component-databases-users-db:5432/byk"
SQLMS_DATASOURCES_0_USERNAME: "byk"
SQLMS_DATASOURCES_0_PASSWORD: "01234" # Change password accordingly
SQLMS_DATASOURCES_0_PASSWORD: "PASSWORD" # Change password accordingly
LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_BOOT: "DEBUG"
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
data:
constants.ini: |
CHATBOT_RUUTER_PUBLIC=http://component-byk-ruuter:8080/backoffice
CHATBOT_RUUTER_PRIVATE=http://component-byk-ruuter-private:8080
CHATBOT_RUUTER_PRIVATE=http://component-byk-ruuter-private:8080
CHATBOT_RUUTER=http://component-byk-ruuter:8080
CHATBOT_RESQL=http://component-byk-resql:8082
CHATBOT_RESQL=http://component-byk-resql:8082/backoffice
CHATBOT_DMAPPER=http://component-byk-dmapper:3000
CHATBOT_TIM=http://component-byk-tim:8085
CHATBOT_OPENSEARCH=http://component-opensearch-node:9200
Expand All @@ -25,5 +25,5 @@ data:
SERVICE_DMAPPER=http://component-byk-dmapper:3000
SERVICE_RUUTER=http://component-byk-ruuter-private:8080
SERVICE_RESQL=http://component-byk-resql:8082
DOMAIN=test.buerokratt.ee
DOMAIN=stage.buerokratt.ee

0 comments on commit bb84335

Please sign in to comment.