diff --git a/cart-microservice-nodejs/helm-charts/.helmignore b/cart-microservice-nodejs/helm-charts/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/cart-microservice-nodejs/helm-charts/.helmignore @@ -0,0 +1,23 @@ +# 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 +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/cart-microservice-nodejs/helm-charts/Chart.yaml b/cart-microservice-nodejs/helm-charts/Chart.yaml new file mode 100644 index 0000000..ce0025f --- /dev/null +++ b/cart-microservice-nodejs/helm-charts/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: helm-charts +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/cart-microservice-nodejs/helm-charts/templates/_helpers.tpl b/cart-microservice-nodejs/helm-charts/templates/_helpers.tpl new file mode 100644 index 0000000..eab42fc --- /dev/null +++ b/cart-microservice-nodejs/helm-charts/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "helm-charts.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 "helm-charts.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 "helm-charts.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "helm-charts.labels" -}} +helm.sh/chart: {{ include "helm-charts.chart" . }} +{{ include "helm-charts.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "helm-charts.selectorLabels" -}} +app.kubernetes.io/name: {{ include "helm-charts.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "helm-charts.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "helm-charts.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/cart-microservice-nodejs/helm-charts/templates/deployment.yaml b/cart-microservice-nodejs/helm-charts/templates/deployment.yaml new file mode 100644 index 0000000..7529ef7 --- /dev/null +++ b/cart-microservice-nodejs/helm-charts/templates/deployment.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name}} + labels: + {{- include "helm-charts.labels" . | nindent 4}} +spec: + replicas: {{ .Values.replicaCount}} + selector: + matchLabels: + {{- include "helm-charts.selectorLabels" . | nindent 6}} + template: + metadata: + labels: + {{- include "helm-charts.selectorLabels" . | nindent 8}} + spec: + containers: + - name: {{ .Values.service.name}} + image: {{ .Values.image.repository}} + imagePullPolicy: {{ .Values.image.pullPolicy}} + ports: + - containerPort: {{ .Values.service.targetPort}} \ No newline at end of file diff --git a/cart-microservice-nodejs/helm-charts/templates/service.yaml b/cart-microservice-nodejs/helm-charts/templates/service.yaml new file mode 100644 index 0000000..78d87c5 --- /dev/null +++ b/cart-microservice-nodejs/helm-charts/templates/service.yaml @@ -0,0 +1,13 @@ +apiVersion: "v1" +kind: "Service" +metadata: + labels: + {{- include "helm-charts.labels" . | nindent 4}} + name: {{ .Values.service.name}} +spec: + ports: + - name: "http" + port: {{ .Values.service.port}} + targetPort: {{ .Values.service.targetPort}} + selector: + {{- include "helm-charts.selectorLabels" . | nindent 4}} \ No newline at end of file diff --git a/cart-microservice-nodejs/helm-charts/values.yaml b/cart-microservice-nodejs/helm-charts/values.yaml new file mode 100644 index 0000000..9bb6158 --- /dev/null +++ b/cart-microservice-nodejs/helm-charts/values.yaml @@ -0,0 +1,11 @@ +replicaCount: 1 + +image: + repository: deekshithsn/cart + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 1004 + name: cart-ui + targetPort: 1004 diff --git a/offers-microservice-spring-boot/helm-charts/.helmignore b/offers-microservice-spring-boot/helm-charts/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/offers-microservice-spring-boot/helm-charts/.helmignore @@ -0,0 +1,23 @@ +# 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 +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/offers-microservice-spring-boot/helm-charts/Chart.yaml b/offers-microservice-spring-boot/helm-charts/Chart.yaml new file mode 100644 index 0000000..ce0025f --- /dev/null +++ b/offers-microservice-spring-boot/helm-charts/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: helm-charts +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/offers-microservice-spring-boot/helm-charts/templates/_helpers.tpl b/offers-microservice-spring-boot/helm-charts/templates/_helpers.tpl new file mode 100644 index 0000000..eab42fc --- /dev/null +++ b/offers-microservice-spring-boot/helm-charts/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "helm-charts.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 "helm-charts.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 "helm-charts.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "helm-charts.labels" -}} +helm.sh/chart: {{ include "helm-charts.chart" . }} +{{ include "helm-charts.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "helm-charts.selectorLabels" -}} +app.kubernetes.io/name: {{ include "helm-charts.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "helm-charts.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "helm-charts.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/offers-microservice-spring-boot/helm-charts/templates/deployment.yaml b/offers-microservice-spring-boot/helm-charts/templates/deployment.yaml new file mode 100644 index 0000000..7954056 --- /dev/null +++ b/offers-microservice-spring-boot/helm-charts/templates/deployment.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name}} + labels: + {{- include "helm-charts.labels" . | nindent 4}} +spec: + replicas: {{ .Values.replicaCount}} + selector: + matchLabels: + {{- include "helm-charts.selectorLabels" . | nindent 6}} + template: + metadata: + labels: + {{- include "helm-charts.selectorLabels" . | nindent 8}} + spec: + containers: + - name: {{ .Values.service.name | quote}} + image: {{ .Values.image.repository}} + imagePullPolicy: {{ .Values.image.pullPolicy}} + ports: + - containerPort: {{ .Values.service.targetPort}} \ No newline at end of file diff --git a/offers-microservice-spring-boot/helm-charts/templates/service.yaml b/offers-microservice-spring-boot/helm-charts/templates/service.yaml new file mode 100644 index 0000000..78d87c5 --- /dev/null +++ b/offers-microservice-spring-boot/helm-charts/templates/service.yaml @@ -0,0 +1,13 @@ +apiVersion: "v1" +kind: "Service" +metadata: + labels: + {{- include "helm-charts.labels" . | nindent 4}} + name: {{ .Values.service.name}} +spec: + ports: + - name: "http" + port: {{ .Values.service.port}} + targetPort: {{ .Values.service.targetPort}} + selector: + {{- include "helm-charts.selectorLabels" . | nindent 4}} \ No newline at end of file diff --git a/offers-microservice-spring-boot/helm-charts/values.yaml b/offers-microservice-spring-boot/helm-charts/values.yaml new file mode 100644 index 0000000..84f65f2 --- /dev/null +++ b/offers-microservice-spring-boot/helm-charts/values.yaml @@ -0,0 +1,11 @@ +replicaCount: 1 + +image: + repository: deekshithsn/offer + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 1001 + name: offer-ui + targetPort: 1001 diff --git a/shoes-microservice-spring-boot/helm-charts/.helmignore b/shoes-microservice-spring-boot/helm-charts/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/shoes-microservice-spring-boot/helm-charts/.helmignore @@ -0,0 +1,23 @@ +# 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 +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/shoes-microservice-spring-boot/helm-charts/Chart.yaml b/shoes-microservice-spring-boot/helm-charts/Chart.yaml new file mode 100644 index 0000000..ce0025f --- /dev/null +++ b/shoes-microservice-spring-boot/helm-charts/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: helm-charts +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/shoes-microservice-spring-boot/helm-charts/templates/_helpers.tpl b/shoes-microservice-spring-boot/helm-charts/templates/_helpers.tpl new file mode 100644 index 0000000..eab42fc --- /dev/null +++ b/shoes-microservice-spring-boot/helm-charts/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "helm-charts.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 "helm-charts.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 "helm-charts.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "helm-charts.labels" -}} +helm.sh/chart: {{ include "helm-charts.chart" . }} +{{ include "helm-charts.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "helm-charts.selectorLabels" -}} +app.kubernetes.io/name: {{ include "helm-charts.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "helm-charts.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "helm-charts.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/shoes-microservice-spring-boot/helm-charts/templates/deployment.yaml b/shoes-microservice-spring-boot/helm-charts/templates/deployment.yaml new file mode 100644 index 0000000..ee73809 --- /dev/null +++ b/shoes-microservice-spring-boot/helm-charts/templates/deployment.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name}} + labels: + {{- include "helm-charts.labels" . | nindent 4}} +spec: + replicas: {{ .Values.replicaCount}} + selector: + matchLabels: + {{- include "helm-charts.selectorLabels" . | nindent 6}} + template: + metadata: + labels: + {{- include "helm-charts.selectorLabels" . | nindent 8 }} + spec: + containers: + - name: {{ .Values.service.name}} + image: {{ .Values.image.repository}} + imagePullPolicy: {{ .Values.image.pullPolicy}} + ports: + - containerPort: {{ .Values.service.targetPort}} \ No newline at end of file diff --git a/shoes-microservice-spring-boot/helm-charts/templates/service.yaml b/shoes-microservice-spring-boot/helm-charts/templates/service.yaml new file mode 100644 index 0000000..8ec9644 --- /dev/null +++ b/shoes-microservice-spring-boot/helm-charts/templates/service.yaml @@ -0,0 +1,13 @@ +apiVersion: "v1" +kind: "Service" +metadata: + labels: + {{- include "helm-charts.labels" . | nindent 4}} + name: {{ .Values.service.name | quote}} +spec: + ports: + - name: "http" + port: {{ .Values.service.port}} + targetPort: {{ .Values.service.targetPort}} + selector: + {{- include "helm-charts.selectorLabels" . | nindent 4}} \ No newline at end of file diff --git a/shoes-microservice-spring-boot/helm-charts/values.yaml b/shoes-microservice-spring-boot/helm-charts/values.yaml new file mode 100644 index 0000000..3e20889 --- /dev/null +++ b/shoes-microservice-spring-boot/helm-charts/values.yaml @@ -0,0 +1,12 @@ +replicaCount: 1 + +image: + repository: deekshithsn/shoe + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 1002 + name: shoe-ui + targetPort: 1002 + diff --git a/ui-web-app-reactjs/helm-charts/.helmignore b/ui-web-app-reactjs/helm-charts/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/ui-web-app-reactjs/helm-charts/.helmignore @@ -0,0 +1,23 @@ +# 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 +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/ui-web-app-reactjs/helm-charts/Chart.yaml b/ui-web-app-reactjs/helm-charts/Chart.yaml new file mode 100644 index 0000000..ce0025f --- /dev/null +++ b/ui-web-app-reactjs/helm-charts/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: helm-charts +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/ui-web-app-reactjs/helm-charts/templates/_helpers.tpl b/ui-web-app-reactjs/helm-charts/templates/_helpers.tpl new file mode 100644 index 0000000..eab42fc --- /dev/null +++ b/ui-web-app-reactjs/helm-charts/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "helm-charts.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 "helm-charts.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 "helm-charts.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "helm-charts.labels" -}} +helm.sh/chart: {{ include "helm-charts.chart" . }} +{{ include "helm-charts.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "helm-charts.selectorLabels" -}} +app.kubernetes.io/name: {{ include "helm-charts.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "helm-charts.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "helm-charts.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/ui-web-app-reactjs/helm-charts/templates/deployment.yaml b/ui-web-app-reactjs/helm-charts/templates/deployment.yaml new file mode 100644 index 0000000..0e46da3 --- /dev/null +++ b/ui-web-app-reactjs/helm-charts/templates/deployment.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name}} + labels: + {{- include "helm-charts.labels" . | nindent 4}} +spec: + replicas: {{ .Values.replicaCount}} + selector: + matchLabels: + {{- include "helm-charts.selectorLabels" . | + nindent 6 }} + template: + metadata: + labels: + {{- include "helm-charts.selectorLabels" . | + nindent 8 }} + spec: + containers: + - name: {{ .Values.container.name}} + image: {{ .Values.image.repository | quote}} + imagePullPolicy: {{ .Values.image.pullPolicy}} + ports: + - containerPort: {{ .Values.service.targetPort}} \ No newline at end of file diff --git a/ui-web-app-reactjs/helm-charts/templates/service.yaml b/ui-web-app-reactjs/helm-charts/templates/service.yaml new file mode 100644 index 0000000..183eb7e --- /dev/null +++ b/ui-web-app-reactjs/helm-charts/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: "v1" +kind: "Service" +metadata: + labels: + {{ include "helm-charts.labels" . | + nindent 4 }} + name: {{ .Values.service.name}} +spec: + ports: + - name: "http" + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort}} + selector: + {{ include "helm-charts.selectorLabels" . | nindent 4}} + type: {{ .Values.service.type}} \ No newline at end of file diff --git a/ui-web-app-reactjs/helm-charts/values.yaml b/ui-web-app-reactjs/helm-charts/values.yaml new file mode 100644 index 0000000..a98bd45 --- /dev/null +++ b/ui-web-app-reactjs/helm-charts/values.yaml @@ -0,0 +1,15 @@ +replicaCount: 1 + +image: + repository: deekshithsn/ui + pullPolicy: IfNotPresent + + +service: + type: ClusterIP + port: 80 + name: ui + targetPort : 8080 + +container: + name: react-ui \ No newline at end of file diff --git a/wishlist-microservice-python/helm-charts/.helmignore b/wishlist-microservice-python/helm-charts/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/wishlist-microservice-python/helm-charts/.helmignore @@ -0,0 +1,23 @@ +# 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 +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/wishlist-microservice-python/helm-charts/Chart.yaml b/wishlist-microservice-python/helm-charts/Chart.yaml new file mode 100644 index 0000000..ce0025f --- /dev/null +++ b/wishlist-microservice-python/helm-charts/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: helm-charts +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/wishlist-microservice-python/helm-charts/templates/_helpers.tpl b/wishlist-microservice-python/helm-charts/templates/_helpers.tpl new file mode 100644 index 0000000..eab42fc --- /dev/null +++ b/wishlist-microservice-python/helm-charts/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "helm-charts.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 "helm-charts.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 "helm-charts.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "helm-charts.labels" -}} +helm.sh/chart: {{ include "helm-charts.chart" . }} +{{ include "helm-charts.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "helm-charts.selectorLabels" -}} +app.kubernetes.io/name: {{ include "helm-charts.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "helm-charts.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "helm-charts.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/wishlist-microservice-python/helm-charts/templates/deployment.yaml b/wishlist-microservice-python/helm-charts/templates/deployment.yaml new file mode 100644 index 0000000..f71753e --- /dev/null +++ b/wishlist-microservice-python/helm-charts/templates/deployment.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name}} + labels: + {{- include "helm-charts.labels" . | nindent 4}} +spec: + replicas: {{ .Values.replicaCount}} + selector: + matchLabels: + {{- include "helm-charts.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + app: {{ .Values.service.name}} + spec: + containers: + - name: {{ .Values.service.name}} + image: {{ .Values.image.repository}} + imagePullPolicy: {{ .Values.image.pullPolicy}} + ports: + - containerPort: {{ .Values.service.targetPort}} \ No newline at end of file diff --git a/wishlist-microservice-python/helm-charts/templates/service.yaml b/wishlist-microservice-python/helm-charts/templates/service.yaml new file mode 100644 index 0000000..fd68b67 --- /dev/null +++ b/wishlist-microservice-python/helm-charts/templates/service.yaml @@ -0,0 +1,13 @@ +apiVersion: "v1" +kind: "Service" +metadata: + labels: + {{- include "helm-charts.labels" . | nindent 4 }} + name: {{ .Values.service.name | quote}} +spec: + ports: + - name: "http" + port: {{ .Values.service.port}} + targetPort: {{ .Values.service.targetPort}} + selector: + {{- include "helm-charts.selectorLabels" . | nindent 4}} \ No newline at end of file diff --git a/wishlist-microservice-python/helm-charts/values.yaml b/wishlist-microservice-python/helm-charts/values.yaml new file mode 100644 index 0000000..2779c82 --- /dev/null +++ b/wishlist-microservice-python/helm-charts/values.yaml @@ -0,0 +1,11 @@ +replicaCount: 1 + +image: + repository: deekshithsn/wishlist + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 1003 + name: wishlist-ui + targetPort: 5000 diff --git a/wishlist-microservice-python/test.yaml b/wishlist-microservice-python/test.yaml new file mode 100644 index 0000000..cbfce16 Binary files /dev/null and b/wishlist-microservice-python/test.yaml differ diff --git a/zuul-api-gateway/helm-chart/templates/deployment.yaml b/zuul-api-gateway/helm-chart/templates/deployment.yaml index 8ce16f2..3405dd5 100644 --- a/zuul-api-gateway/helm-chart/templates/deployment.yaml +++ b/zuul-api-gateway/helm-chart/templates/deployment.yaml @@ -1,24 +1,22 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Release.Name }} + name: {{ .Release.Name}}} labels: - {{- include "helm-chart.labels" . | nindent 4 }} + {{- include "helm-chart.labels" . | nindent 4}} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.replicaCount}} selector: - matchLabels: - {{- include "helm-chart.selectorLabels" . | nindent 6 }} + matchLabels: + {{- include "helm-chart.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "helm-chart.selectorLabels" . | nindent 8 }} spec: containers: - - name: {{ .Values.container.name }} - image: {{ .Values.image.repository }} - imagePullPolicy: {{ .Values.image.pullPolicy }} + - name: {{ .Values.service.name}} + image: {{ .Values.image.repository}} + imagePullPolicy: {{ .Values.image.pullPolicy}} ports: - - containerPort: {{ .Values.service.targetport }} - affinity: - {{- toYaml .Values.cpa | nindent 8 }} \ No newline at end of file + - containerPort: {{ .Values.service.targetPort}} \ No newline at end of file diff --git a/zuul-api-gateway/helm-chart/templates/service.yaml b/zuul-api-gateway/helm-chart/templates/service.yaml index f4bfe55..713e53f 100644 --- a/zuul-api-gateway/helm-chart/templates/service.yaml +++ b/zuul-api-gateway/helm-chart/templates/service.yaml @@ -1,15 +1,15 @@ -apiVersion: v1 -kind: Service +apiVersion: "v1" +kind: "Service" metadata: labels: - {{- include "helm-chart.labels" . | nindent 4 }} - name: {{ .Values.service.name | quote }} + {{- include "helm-chart.labels" . | nindent 4}} + name: {{ .Values.service.name | quote}} spec: ports: - name: "http" - port: {{ .Values.service.port }} - targetPort: {{ .Values.service.targetport }} - nodePort: {{ .Values.service.nodeport }} - type: {{ .Values.service.type }} + port: {{ .Values.service.port}} + targetPort: {{ .Values.service.targetPort}} + nodePort: {{ .Values.service.nodePort}} + type: {{ .Values.service.type}} selector: - {{- include "helm-chart.selectorLabels" . | nindent 4 }} \ No newline at end of file + {{- include "helm-chart.selectorLabels" . | nindent 4}} diff --git a/zuul-api-gateway/helm-chart/values.yaml b/zuul-api-gateway/helm-chart/values.yaml index fd64e6a..e8bd6c5 100644 --- a/zuul-api-gateway/helm-chart/values.yaml +++ b/zuul-api-gateway/helm-chart/values.yaml @@ -1,4 +1,3 @@ - replicaCount: 1 image: @@ -9,19 +8,5 @@ service: type: NodePort port: 9999 name: zuul-api-gateway - targetport: 9999 - nodeport: 32470 - -container: - name: zuul-api-gateway - -cpa: - podAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - react-ui - topologyKey: "kubernetes.io/hostname" \ No newline at end of file + nodePort : 32470 + targetPort: 9999 \ No newline at end of file diff --git a/zuul-api-gateway/test.yaml b/zuul-api-gateway/test.yaml new file mode 100644 index 0000000..148de87 Binary files /dev/null and b/zuul-api-gateway/test.yaml differ