@ -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 |
@ -1,5 +0,0 @@ | |||
apiVersion: v1 | |||
appVersion: "1.0" | |||
description: A Helm chart for Kubernetes | |||
name: ordering-backgroundtasks | |||
version: 0.1.0 |
@ -1,3 +0,0 @@ | |||
eShop Ordering Background Tasks installed. | |||
------------------------------------------ | |||
@ -1,32 +0,0 @@ | |||
{{/* vim: set filetype=mustache: */}} | |||
{{/* | |||
Expand the name of the chart. | |||
*/}} | |||
{{- define "ordering-backgroundtasks.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 "ordering-backgroundtasks.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 "ordering-backgroundtasks.chart" -}} | |||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | |||
{{- end -}} |
@ -1,51 +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 <dns>/<name> */}} | |||
{{- 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 -}} |
@ -1,21 +0,0 @@ | |||
{{- $name := include "ordering-backgroundtasks.fullname" . -}} | |||
{{- $sqlsrv := include "sql-name" . -}} | |||
{{- $cfgname := printf "cfg-%s" $name | trunc 63 }} | |||
apiVersion: v1 | |||
kind: ConfigMap | |||
metadata: | |||
name: "{{ $cfgname }}" | |||
labels: | |||
app: {{ template "ordering-backgroundtasks.name" . }} | |||
chart: {{ template "ordering-backgroundtasks.chart" .}} | |||
release: {{ .Release.Name }} | |||
heritage: {{ .Release.Service }} | |||
data: | |||
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; | |||
ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" | |||
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} | |||
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" | |||
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" | |||
graceperiodmanager__CheckUpdateTime: "{{ .Values.cfg.checkUpdateTime }}" | |||
graceperiodmanager__GracePeriodTime: "{{ .Values.cfg.gracePeriodTime }}" |
@ -1,92 +0,0 @@ | |||
{{- $name := include "ordering-backgroundtasks.fullname" . -}} | |||
{{- $cfgname := printf "cfg-%s" $name | trunc 63 }} | |||
apiVersion: apps/v1beta2 | |||
kind: Deployment | |||
metadata: | |||
name: {{ template "ordering-backgroundtasks.fullname" . }} | |||
labels: | |||
app: {{ template "ordering-backgroundtasks.name" . }} | |||
chart: {{ template "ordering-backgroundtasks.chart" . }} | |||
release: {{ .Release.Name }} | |||
heritage: {{ .Release.Service }} | |||
spec: | |||
replicas: {{ .Values.replicaCount }} | |||
selector: | |||
matchLabels: | |||
app: {{ template "ordering-backgroundtasks.name" . }} | |||
release: {{ .Release.Name }} | |||
template: | |||
metadata: | |||
labels: | |||
app: {{ template "ordering-backgroundtasks.name" . }} | |||
release: {{ .Release.Name }} | |||
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 }} | |||
@ -1,19 +0,0 @@ | |||
apiVersion: v1 | |||
kind: Service | |||
metadata: | |||
name: {{ .Values.app.svc.orderingbackgroundtasks }} | |||
labels: | |||
app: {{ template "ordering-backgroundtasks.name" . }} | |||
chart: {{ template "ordering-backgroundtasks.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 "ordering-backgroundtasks.name" . }} | |||
release: {{ .Release.Name }} |
@ -1,70 +0,0 @@ | |||
replicaCount: 1 | |||
clusterName: eshop-aks | |||
pathBase: /ordering-backgroundtasks | |||
image: | |||
repository: eshop/ordering.backgroundtasks | |||
tag: latest | |||
pullPolicy: IfNotPresent | |||
service: | |||
type: ClusterIP | |||
port: 80 | |||
ingress: | |||
enabled: false | |||
annotations: {} | |||
hosts: | |||
- chart-example.local | |||
tls: [] | |||
cfg: | |||
checkUpdateTime: "15000" | |||
gracePeriodTime: "1" | |||
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: ConnectionString | |||
key: ordering__ConnectionString | |||
- name: ApplicationInsights__InstrumentationKey | |||
key: all__InstrumentationKey | |||
- name: EventBusConnection | |||
key: all__EventBusConnection | |||
- name: AzureServiceBusEnabled | |||
key: all__UseAzureServiceBus | |||
- name: UseLoadTest | |||
key: ordering__EnableLoadTest | |||
- name: CheckUpdateTime | |||
key: graceperiodmanager__CheckUpdateTime | |||
- name: GracePeriodTime | |||
key: graceperiodmanager__GracePeriodTime | |||
# 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 |