diff --git a/build/azure-devops/location-api/azure-pipelines.yml b/build/azure-devops/location-api/azure-pipelines.yml deleted file mode 100644 index d6b87e881..000000000 --- a/build/azure-devops/location-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Services/Location/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/location-api/* - - deploy/k8s/helm/locations-api/* -jobs: -- template: ../buildimages.yaml - parameters: - services: locations-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: locations.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/marketing-api/azure-pipelines.yml b/build/azure-devops/marketing-api/azure-pipelines.yml deleted file mode 100644 index 5b253e1c1..000000000 --- a/build/azure-devops/marketing-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Services/Marketing/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/marketing-api/* - - deploy/k8s/helm/marketing-api/* -jobs: -- template: ../buildimages.yaml - parameters: - services: marketing-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: marketing.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/deploy/k8s/helm/apigwmm/.helmignore b/deploy/k8s/helm/apigwmm/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/helm/apigwmm/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/helm/apigwmm/Chart.yaml b/deploy/k8s/helm/apigwmm/Chart.yaml deleted file mode 100644 index 50b3d07c6..000000000 --- a/deploy/k8s/helm/apigwmm/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: apigwmm -version: 0.1.0 diff --git a/deploy/k8s/helm/apigwmm/envoy.yaml b/deploy/k8s/helm/apigwmm/envoy.yaml deleted file mode 100644 index 54b1afa06..000000000 --- a/deploy/k8s/helm/apigwmm/envoy.yaml +++ /dev/null @@ -1,75 +0,0 @@ -admin: - access_log_path: "/dev/null" - address: - socket_address: - address: 0.0.0.0 - port_value: 8001 -static_resources: - listeners: - - address: - socket_address: - address: 0.0.0.0 - port_value: 80 - filter_chains: - - filters: - - name: envoy.http_connection_manager - config: - codec_type: auto - stat_prefix: ingress_http - route_config: - name: eshop_backend_route - virtual_hosts: - - name: eshop_backend - domains: - - "*" - routes: - - name: "m-short" - match: - prefix: "/m/" - route: - auto_host_rewrite: true - prefix_rewrite: "/marketing-api/" - cluster: marketing - - name: "m-long" - match: - prefix: "/marketing-api/" - route: - auto_host_rewrite: true - cluster: marketing - http_filters: - - name: envoy.router - access_log: - - name: envoy.file_access_log - filter: - not_health_check_filter: {} - config: - json_format: - time: "%START_TIME%" - protocol: "%PROTOCOL%" - duration: "%DURATION%" - request_method: "%REQ(:METHOD)%" - request_host: "%REQ(HOST)%" - path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" - response_flags: "%RESPONSE_FLAGS%" - route_name: "%ROUTE_NAME%" - upstream_host: "%UPSTREAM_HOST%" - upstream_cluster: "%UPSTREAM_CLUSTER%" - upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" - path: "/tmp/access.log" - clusters: - - name: marketing - connect_timeout: 0.25s - type: logical_dns - lb_policy: round_robin - hosts: - - socket_address: - address: marketing-api - port_value: 80 - - name: locations - connect_timeout: 0.25s - type: logical_dns - lb_policy: round_robin - hosts: - - socket_address: - address: locations-api - port_value: 80 diff --git a/deploy/k8s/helm/apigwmm/templates/NOTES.txt b/deploy/k8s/helm/apigwmm/templates/NOTES.txt deleted file mode 100644 index 30ef33447..000000000 --- a/deploy/k8s/helm/apigwmm/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -eShop API Gateway for Mobile Marketing services installed ----------------------------------------------------------- \ No newline at end of file diff --git a/deploy/k8s/helm/apigwmm/templates/_helpers.tpl b/deploy/k8s/helm/apigwmm/templates/_helpers.tpl deleted file mode 100644 index fd3d89212..000000000 --- a/deploy/k8s/helm/apigwmm/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "apigwmm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "apigwmm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "apigwmm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/helm/apigwmm/templates/_names.tpl b/deploy/k8s/helm/apigwmm/templates/_names.tpl deleted file mode 100644 index d44859fea..000000000 --- a/deploy/k8s/helm/apigwmm/templates/_names.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/helm/apigwmm/templates/deployment.yaml b/deploy/k8s/helm/apigwmm/templates/deployment.yaml deleted file mode 100644 index 70b4ffa8f..000000000 --- a/deploy/k8s/helm/apigwmm/templates/deployment.yaml +++ /dev/null @@ -1,110 +0,0 @@ -{{- $name := include "apigwmm.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -{{- $envoycfgname := printf "%s-%s" "envoy" $name -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "apigwmm.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "apigwmm.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "apigwmm.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ $envoycfgname }} - items: - - key: envoy.yaml - path: envoy.yaml - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: IfNotPresent - volumeMounts: - - name: config - mountPath: {{ .Values.envoy.configPath }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - - name: admin - containerPort: 8001 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml b/deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml deleted file mode 100644 index 66de90f5c..000000000 --- a/deploy/k8s/helm/apigwmm/templates/envoy-cm.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- $name := include "apigwmm.fullname" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "envoy-{{ $name }}" - labels: - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} - diff --git a/deploy/k8s/helm/apigwmm/templates/ingress.yaml b/deploy/k8s/helm/apigwmm/templates/ingress.yaml deleted file mode 100644 index 44e9a90fc..000000000 --- a/deploy/k8s/helm/apigwmm/templates/ingress.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $ingressPath := include "pathBase" . -}} -{{- $serviceName := .Values.app.svc.mobilemarketingapigw -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ template "apigwmm.fullname" . }} - labels: - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.ingress.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} - cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} -{{- end }} -{{- if .Values.inf.mesh.enabled }} -{{- with .Values.ingress.mesh.annotations }} -{{ toYaml . | indent 4 }} -{{- end }} -{{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ . }} - http: - paths: - - path: {{ $ingressPath }} - backend: - serviceName: {{ $serviceName }} - servicePort: http - {{- end }} -{{- end }} diff --git a/deploy/k8s/helm/apigwmm/templates/service.yaml b/deploy/k8s/helm/apigwmm/templates/service.yaml deleted file mode 100644 index 286277c7d..000000000 --- a/deploy/k8s/helm/apigwmm/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.mobilemarketingapigw }} - labels: - app: {{ template "apigwmm.name" . }} - chart: {{ template "apigwmm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - - port: {{ .Values.service.adminPort }} - targetPort: admin - protocol: TCP - name: admin - selector: - app: {{ template "apigwmm.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/helm/apigwmm/values.yaml b/deploy/k8s/helm/apigwmm/values.yaml deleted file mode 100644 index 21f12f27a..000000000 --- a/deploy/k8s/helm/apigwmm/values.yaml +++ /dev/null @@ -1,45 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /mobilemarketingapigw - -image: - repository: envoyproxy/envoy - tag: v1.11.1 - -service: - type: ClusterIP - port: 80 - adminPort: 8001 - -ingress: - enabled: true - annotations: - nginx.ingress.kubernetes.io/rewrite-target: "/" - ingress.kubernetes.io/rewrite-target: "/" - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -env: {} - -envoy: - configPath: /etc/envoy - -probes: - liveness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 15 - port: 8001 - readiness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 60 - port: 8001 \ No newline at end of file diff --git a/deploy/k8s/helm/apigwwm/.helmignore b/deploy/k8s/helm/apigwwm/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/helm/apigwwm/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/helm/apigwwm/Chart.yaml b/deploy/k8s/helm/apigwwm/Chart.yaml deleted file mode 100644 index 4c2082969..000000000 --- a/deploy/k8s/helm/apigwwm/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: apigwwm -version: 0.1.0 diff --git a/deploy/k8s/helm/apigwwm/envoy.yaml b/deploy/k8s/helm/apigwwm/envoy.yaml deleted file mode 100644 index c6f3421de..000000000 --- a/deploy/k8s/helm/apigwwm/envoy.yaml +++ /dev/null @@ -1,75 +0,0 @@ -admin: - access_log_path: "/dev/null" - address: - socket_address: - address: 0.0.0.0 - port_value: 8001 -static_resources: - listeners: - - address: - socket_address: - address: 0.0.0.0 - port_value: 80 - filter_chains: - - filters: - - name: envoy.http_connection_manager - config: - codec_type: auto - stat_prefix: ingress_http - route_config: - name: eshop_backend_route - virtual_hosts: - - name: eshop_backend - domains: - - "*" - routes: - - name: "m-short" - match: - prefix: "/m/" - route: - auto_host_rewrite: true - prefix_rewrite: "/marketing-api/" - cluster: marketing - - name: "m-long" - match: - prefix: "/marketing-api/" - route: - auto_host_rewrite: true - cluster: marketing - http_filters: - - name: envoy.router - access_log: - - name: envoy.file_access_log - filter: - not_health_check_filter: {} - config: - json_format: - time: "%START_TIME%" - protocol: "%PROTOCOL%" - duration: "%DURATION%" - request_method: "%REQ(:METHOD)%" - request_host: "%REQ(HOST)%" - path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" - response_flags: "%RESPONSE_FLAGS%" - route_name: "%ROUTE_NAME%" - upstream_host: "%UPSTREAM_HOST%" - upstream_cluster: "%UPSTREAM_CLUSTER%" - upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" - path: "/tmp/access.log" - clusters: - - name: marketing - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - hosts: - - socket_address: - address: marketing-api - port_value: 80 - - name: locations - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - hosts: - - socket_address: - address: locations-api - port_value: 80 diff --git a/deploy/k8s/helm/apigwwm/templates/NOTES.txt b/deploy/k8s/helm/apigwwm/templates/NOTES.txt deleted file mode 100644 index 3420c97c8..000000000 --- a/deploy/k8s/helm/apigwwm/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -eShop API Gateway for Web Marketing services installed ------------------------------------------------------- \ No newline at end of file diff --git a/deploy/k8s/helm/apigwwm/templates/_helpers.tpl b/deploy/k8s/helm/apigwwm/templates/_helpers.tpl deleted file mode 100644 index 194cf96ca..000000000 --- a/deploy/k8s/helm/apigwwm/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "apigwwm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "apigwwm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "apigwwm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/helm/apigwwm/templates/_names.tpl b/deploy/k8s/helm/apigwwm/templates/_names.tpl deleted file mode 100644 index d44859fea..000000000 --- a/deploy/k8s/helm/apigwwm/templates/_names.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/helm/apigwwm/templates/deployment.yaml b/deploy/k8s/helm/apigwwm/templates/deployment.yaml deleted file mode 100644 index 8c8619f8a..000000000 --- a/deploy/k8s/helm/apigwwm/templates/deployment.yaml +++ /dev/null @@ -1,110 +0,0 @@ -{{- $name := include "apigwwm.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -{{- $envoycfgname := printf "%s-%s" "envoy" $name -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "apigwwm.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "apigwwm.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "apigwwm.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ $envoycfgname }} - items: - - key: envoy.yaml - path: envoy.yaml - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: IfNotPresent - volumeMounts: - - name: config - mountPath: {{ .Values.envoy.configPath }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - - name: admin - containerPort: 8001 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml b/deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml deleted file mode 100644 index e197812c8..000000000 --- a/deploy/k8s/helm/apigwwm/templates/envoy-cm.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- $name := include "apigwwm.fullname" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "envoy-{{ $name }}" - labels: - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 -}} - diff --git a/deploy/k8s/helm/apigwwm/templates/ingress.yaml b/deploy/k8s/helm/apigwwm/templates/ingress.yaml deleted file mode 100644 index 00d54c226..000000000 --- a/deploy/k8s/helm/apigwwm/templates/ingress.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $ingressPath := include "pathBase" . -}} -{{- $serviceName := .Values.app.svc.webmarketingapigw -}} - -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ template "apigwwm.fullname" . }} - labels: - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.ingress.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} - cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} -{{- end }} -{{- if .Values.inf.mesh.enabled }} -{{- with .Values.ingress.mesh.annotations }} -{{ toYaml . | indent 4 }} -{{- end }} -{{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ . }} - http: - paths: - - path: {{ $ingressPath }} - backend: - serviceName: {{ $serviceName }} - servicePort: http - {{- end }} -{{- end }} diff --git a/deploy/k8s/helm/apigwwm/templates/service.yaml b/deploy/k8s/helm/apigwwm/templates/service.yaml deleted file mode 100644 index cb11cc665..000000000 --- a/deploy/k8s/helm/apigwwm/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.webmarketingapigw }} - labels: - app: {{ template "apigwwm.name" . }} - chart: {{ template "apigwwm.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - - port: {{ .Values.service.adminPort }} - targetPort: admin - protocol: TCP - name: admin - selector: - app: {{ template "apigwwm.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/helm/apigwwm/values.yaml b/deploy/k8s/helm/apigwwm/values.yaml deleted file mode 100644 index d866c2d3c..000000000 --- a/deploy/k8s/helm/apigwwm/values.yaml +++ /dev/null @@ -1,46 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /webmarketingapigw - -image: - repository: envoyproxy/envoy - tag: v1.11.1 - -service: - type: ClusterIP - port: 80 - adminPort: 8001 - -ingress: - enabled: true - annotations: - nginx.ingress.kubernetes.io/rewrite-target: "/" - ingress.kubernetes.io/rewrite-target: "/" - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# env defines the environment variables that will be declared in the pod -env: {} - -envoy: - configPath: /etc/envoy - -probes: - liveness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 15 - port: 8001 - readiness: - path: /ready - initialDelaySeconds: 5 - periodSeconds: 60 - port: 8001 \ No newline at end of file diff --git a/deploy/k8s/helm/locations-api/.helmignore b/deploy/k8s/helm/locations-api/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/helm/locations-api/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/helm/locations-api/Chart.yaml b/deploy/k8s/helm/locations-api/Chart.yaml deleted file mode 100644 index 5126fe847..000000000 --- a/deploy/k8s/helm/locations-api/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: locations-api -version: 0.1.0 diff --git a/deploy/k8s/helm/locations-api/templates/NOTES.txt b/deploy/k8s/helm/locations-api/templates/NOTES.txt deleted file mode 100644 index 3b48889bf..000000000 --- a/deploy/k8s/helm/locations-api/templates/NOTES.txt +++ /dev/null @@ -1,9 +0,0 @@ -eShop Locations API installed. ------------------------------- - -This API is not directly exposed outside cluster. If need to access it use: - -export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "locations-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") -echo "Visit http://127.0.0.1:8080 to use your application" -kubectl port-forward $POD_NAME 8080:80 - diff --git a/deploy/k8s/helm/locations-api/templates/_helpers.tpl b/deploy/k8s/helm/locations-api/templates/_helpers.tpl deleted file mode 100644 index 086a461ba..000000000 --- a/deploy/k8s/helm/locations-api/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "locations-api.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "locations-api.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "locations-api.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/helm/locations-api/templates/_names.tpl b/deploy/k8s/helm/locations-api/templates/_names.tpl deleted file mode 100644 index d44859fea..000000000 --- a/deploy/k8s/helm/locations-api/templates/_names.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/helm/locations-api/templates/configmap.yaml b/deploy/k8s/helm/locations-api/templates/configmap.yaml deleted file mode 100644 index c5d752509..000000000 --- a/deploy/k8s/helm/locations-api/templates/configmap.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- $name := include "locations-api.fullname" . -}} -{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} -{{- $mongo := include "mongo-name" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "cfg-{{ $name }}" - labels: - app: {{ template "locations-api.name" . }} - chart: {{ template "locations-api.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" - all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" - all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" - internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} - urls__IdentityUrl: {{ $identity }} - locations__ConnectionString: mongodb://{{ $mongo }} - locations__Database: {{ .Values.inf.mongo.locations.database }} \ No newline at end of file diff --git a/deploy/k8s/helm/locations-api/templates/deployment.yaml b/deploy/k8s/helm/locations-api/templates/deployment.yaml deleted file mode 100644 index 1dba5d166..000000000 --- a/deploy/k8s/helm/locations-api/templates/deployment.yaml +++ /dev/null @@ -1,96 +0,0 @@ -{{- $name := include "locations-api.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "locations-api.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "locations-api.name" . }} - chart: {{ template "locations-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "locations-api.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "locations-api.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/helm/locations-api/templates/service.yaml b/deploy/k8s/helm/locations-api/templates/service.yaml deleted file mode 100644 index abd628beb..000000000 --- a/deploy/k8s/helm/locations-api/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.locations }} - labels: - app: {{ template "locations-api.name" . }} - chart: {{ template "locations-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "locations-api.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/helm/locations-api/values.yaml b/deploy/k8s/helm/locations-api/values.yaml deleted file mode 100644 index 4718f2a0b..000000000 --- a/deploy/k8s/helm/locations-api/values.yaml +++ /dev/null @@ -1,66 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /locations-api - -image: - repository: eshop/locations.api - tag: latest - pullPolicy: IfNotPresent - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# env defines the environment variables that will be declared in the pod -env: - urls: - # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). - configmap: - - name: ApplicationInsights__InstrumentationKey - key: all__InstrumentationKey - - name: EventBusConnection - key: all__EventBusConnection - - name: AzureServiceBusEnabled - key: all__UseAzureServiceBus - - name: UseLoadTest - key: all_EnableLoadTest - - name: IdentityUrl - key: internalurls__IdentityUrl - - name: IdentityUrlExternal - key: urls__IdentityUrl - - name: ConnectionString - key: locations__ConnectionString - - name: Database - key: locations__Database - # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) - values: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: OrchestratorType - value: 'K8S' -probes: - liveness: - path: /liveness - initialDelaySeconds: 10 - periodSeconds: 15 - port: 80 - readiness: - path: /hc - timeoutSeconds: 5 - initialDelaySeconds: 90 - periodSeconds: 60 - port: 80 diff --git a/deploy/k8s/helm/marketing-api/.helmignore b/deploy/k8s/helm/marketing-api/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/deploy/k8s/helm/marketing-api/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/deploy/k8s/helm/marketing-api/Chart.yaml b/deploy/k8s/helm/marketing-api/Chart.yaml deleted file mode 100644 index 173f94fd6..000000000 --- a/deploy/k8s/helm/marketing-api/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: marketing-api -version: 0.1.0 diff --git a/deploy/k8s/helm/marketing-api/templates/NOTES.txt b/deploy/k8s/helm/marketing-api/templates/NOTES.txt deleted file mode 100644 index 7fa66ed47..000000000 --- a/deploy/k8s/helm/marketing-api/templates/NOTES.txt +++ /dev/null @@ -1,9 +0,0 @@ -eShop Marketing API installed. ------------------------------- - -This API is not directly exposed outside cluster. If need to access it use: - -export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "marketing-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") -echo "Visit http://127.0.0.1:8080 to use your application" -kubectl port-forward $POD_NAME 8080:80 - diff --git a/deploy/k8s/helm/marketing-api/templates/_helpers.tpl b/deploy/k8s/helm/marketing-api/templates/_helpers.tpl deleted file mode 100644 index c252aeeac..000000000 --- a/deploy/k8s/helm/marketing-api/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "marketing-api.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "marketing-api.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "marketing-api.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/deploy/k8s/helm/marketing-api/templates/_names.tpl b/deploy/k8s/helm/marketing-api/templates/_names.tpl deleted file mode 100644 index 605e92e7e..000000000 --- a/deploy/k8s/helm/marketing-api/templates/_names.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{{- define "suffix-name" -}} -{{- if .Values.app.name -}} -{{- .Values.app.name -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} - -{{- define "sql-name" -}} -{{- if .Values.inf.sql.host -}} -{{- .Values.inf.sql.host -}} -{{- else -}} -{{- printf "%s" "sql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "mongo-name" -}} -{{- if .Values.inf.mongo.host -}} -{{- .Values.inf.mongo.host -}} -{{- else -}} -{{- printf "%s" "nosql-data" -}} -{{- end -}} -{{- end -}} - -{{- define "url-of" -}} -{{- $name := first .}} -{{- $ctx := last .}} -{{- if eq $name "" -}} -{{- $ctx.Values.inf.k8s.dns -}} -{{- else -}} -{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} -{{- end -}} -{{- end -}} - - - -{{- define "pathBase" -}} -{{- if .Values.inf.k8s.suffix -}} -{{- $suffix := include "suffix-name" . -}} -{{- printf "%s-%s" .Values.pathBase $suffix -}} -{{- else -}} -{{- .Values.pathBase -}} -{{- end -}} -{{- end -}} - -{{- define "fqdn-image" -}} -{{- if .Values.inf.registry -}} -{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} -{{- else -}} -{{- .Values.image.repository -}} -{{- end -}} -{{- end -}} - -{{- define "protocol" -}} -{{- if .Values.inf.tls.enabled -}} -{{- printf "%s" "https" -}} -{{- else -}} -{{- printf "%s" "http" -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/helm/marketing-api/templates/configmap.yaml b/deploy/k8s/helm/marketing-api/templates/configmap.yaml deleted file mode 100644 index e6b495a7a..000000000 --- a/deploy/k8s/helm/marketing-api/templates/configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- $name := include "marketing-api.fullname" . -}} -{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} -{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} -{{- $mongo := include "mongo-name" . -}} -{{- $sqlsrv := include "sql-name" . -}} -{{- $protocol := include "protocol" . -}} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: "cfg-{{ $name }}" - labels: - app: {{ template "marketing-api.name" . }} - chart: {{ template "marketing-api.chart" .}} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" - all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" - all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" - internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} - urls__IdentityUrl: {{ $protocol }}://{{ $identity }} - marketing__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.marketing.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; - marketing__MongoConnectionString: mongodb://{{ $mongo }} - marketing__MongoDatabase: {{ .Values.inf.mongo.marketing.database }} - marketing__PicBaseUrl: {{ $protocol }}://{{ $webshoppingapigw }}/c/api/v1/catalog/items/[0]/pic/ \ No newline at end of file diff --git a/deploy/k8s/helm/marketing-api/templates/deployment.yaml b/deploy/k8s/helm/marketing-api/templates/deployment.yaml deleted file mode 100644 index 6b833eb8c..000000000 --- a/deploy/k8s/helm/marketing-api/templates/deployment.yaml +++ /dev/null @@ -1,96 +0,0 @@ -{{- $name := include "marketing-api.fullname" . -}} -{{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "marketing-api.fullname" . }} - labels: - ufo: {{ $cfgname}} - app: {{ template "marketing-api.name" . }} - chart: {{ template "marketing-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "marketing-api.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "marketing-api.name" . }} - release: {{ .Release.Name }} - {{ if .Values.inf.mesh.enabled -}} - annotations: - linkerd.io/inject: enabled - {{- end }} - spec: - {{ if .Values.inf.registry -}} - imagePullSecrets: - - name: {{ .Values.inf.registry.secretName }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - {{ if .Values.probes -}} - {{- if .Values.probes.liveness -}} - livenessProbe: - httpGet: - port: {{ .Values.probes.liveness.port }} - path: {{ .Values.probes.liveness.path }} - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - {{- end -}} - {{- end -}} - {{- if .Values.probes -}} - {{- if .Values.probes.readiness }} - readinessProbe: - httpGet: - port: {{ .Values.probes.readiness.port }} - path: {{ .Values.probes.readiness.path }} - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - {{- end -}} - {{- end }} - image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: PATH_BASE - value: {{ include "pathBase" . }} - - name: k8sname - value: {{ .Values.clusterName }} - {{- if .Values.env.values -}} - {{- range .Values.env.values }} - - name: {{ .name }} - value: {{ .value | quote }} - {{- end -}} - {{- end -}} - {{- if .Values.env.configmap -}} - {{- range .Values.env.configmap }} - - name: {{ .name }} - valueFrom: - configMapKeyRef: - name: {{ $cfgname }} - key: {{ .key }} - {{- end -}} - {{- end }} - ports: - - name: http - containerPort: 80 - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - diff --git a/deploy/k8s/helm/marketing-api/templates/service.yaml b/deploy/k8s/helm/marketing-api/templates/service.yaml deleted file mode 100644 index 0e9bfbea2..000000000 --- a/deploy/k8s/helm/marketing-api/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.app.svc.marketing }} - labels: - app: {{ template "marketing-api.name" . }} - chart: {{ template "marketing-api.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "marketing-api.name" . }} - release: {{ .Release.Name }} diff --git a/deploy/k8s/helm/marketing-api/values.yaml b/deploy/k8s/helm/marketing-api/values.yaml deleted file mode 100644 index 00bebf27f..000000000 --- a/deploy/k8s/helm/marketing-api/values.yaml +++ /dev/null @@ -1,70 +0,0 @@ -replicaCount: 1 -clusterName: eshop-aks -pathBase: /marketing-api - -image: - repository: eshop/marketing.api - tag: latest - pullPolicy: IfNotPresent - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - tls: [] - -resources: {} - - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# env defines the environment variables that will be declared in the pod -env: - urls: - # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). - configmap: - - name: ApplicationInsights__InstrumentationKey - key: all__InstrumentationKey - - name: EventBusConnection - key: all__EventBusConnection - - name: AzureServiceBusEnabled - key: all__UseAzureServiceBus - - name: UseLoadTest - key: all_EnableLoadTest - - name: IdentityUrl - key: internalurls__IdentityUrl - - name: IdentityUrlExternal - key: urls__IdentityUrl - - name: ConnectionString - key: marketing__ConnectionString - - name: MongoConnectionString - key: marketing__MongoConnectionString - - name: MongoDatabase - key: marketing__MongoDatabase - - name: PicBaseUrl - key: marketing__PicBaseUrl - # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) - values: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: OrchestratorType - value: 'K8S' -probes: - liveness: - path: /liveness - initialDelaySeconds: 10 - periodSeconds: 15 - port: 80 - readiness: - path: /hc - timeoutSeconds: 5 - initialDelaySeconds: 90 - periodSeconds: 60 - port: 80