From 73bb005651a00daf57edcc6bba06c1915547dd5b Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Fri, 16 May 2025 11:16:32 +0300 Subject: [PATCH] First commit --- README.md | 0 argocd-apps/ora-map.yaml | 21 ++++++++ charts/ora-map/.helmignore | 23 +++++++++ charts/ora-map/Chart.yaml | 24 +++++++++ charts/ora-map/templates/_helpers.tpl | 62 ++++++++++++++++++++++++ charts/ora-map/templates/deployment.yaml | 38 +++++++++++++++ charts/ora-map/templates/ingress.yaml | 33 +++++++++++++ charts/ora-map/templates/service.yaml | 19 ++++++++ charts/ora-map/values.yaml | 22 +++++++++ manifests/ora-map/values.yaml | 22 +++++++++ 10 files changed, 264 insertions(+) create mode 100644 README.md create mode 100644 argocd-apps/ora-map.yaml create mode 100644 charts/ora-map/.helmignore create mode 100644 charts/ora-map/Chart.yaml create mode 100644 charts/ora-map/templates/_helpers.tpl create mode 100644 charts/ora-map/templates/deployment.yaml create mode 100644 charts/ora-map/templates/ingress.yaml create mode 100644 charts/ora-map/templates/service.yaml create mode 100644 charts/ora-map/values.yaml create mode 100644 manifests/ora-map/values.yaml diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/argocd-apps/ora-map.yaml b/argocd-apps/ora-map.yaml new file mode 100644 index 0000000..5d3c023 --- /dev/null +++ b/argocd-apps/ora-map.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: oramap + namespace: argocd +spec: + project: dev-tools + source: + repoURL: https://git.dvirlabs.com/dvirlabs/dev-tools.git + targetRevision: HEAD + path: charts/oramap + helm: + valueFiles: + - ../../manifests/ora-map/values.yaml + destination: + server: https://kubernetes.default.svc + namespace: dev-tools + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/charts/ora-map/.helmignore b/charts/ora-map/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/ora-map/.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/charts/ora-map/Chart.yaml b/charts/ora-map/Chart.yaml new file mode 100644 index 0000000..412996b --- /dev/null +++ b/charts/ora-map/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: ora-map +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/charts/ora-map/templates/_helpers.tpl b/charts/ora-map/templates/_helpers.tpl new file mode 100644 index 0000000..ce8a0d8 --- /dev/null +++ b/charts/ora-map/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "ora-map.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 "ora-map.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 "ora-map.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "ora-map.labels" -}} +helm.sh/chart: {{ include "ora-map.chart" . }} +{{ include "ora-map.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "ora-map.selectorLabels" -}} +app.kubernetes.io/name: {{ include "ora-map.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ora-map.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "ora-map.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/ora-map/templates/deployment.yaml b/charts/ora-map/templates/deployment.yaml new file mode 100644 index 0000000..e6eff7f --- /dev/null +++ b/charts/ora-map/templates/deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "oramap.fullname" . }} + labels: + app: {{ include "oramap.name" . }} + chart: {{ include "oramap.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ include "oramap.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "oramap.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.containerPort }} + name: http + livenessProbe: + httpGet: + path: / + port: http + readinessProbe: + httpGet: + path: / + port: http + resources: + {{- toYaml .Values.resources | nindent 12 }} diff --git a/charts/ora-map/templates/ingress.yaml b/charts/ora-map/templates/ingress.yaml new file mode 100644 index 0000000..04dabe8 --- /dev/null +++ b/charts/ora-map/templates/ingress.yaml @@ -0,0 +1,33 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "oramap.fullname" . }} + annotations: + {{- if .Values.ingress.className }} + kubernetes.io/ingress.class: {{ .Values.ingress.className }} + {{- end }} +spec: + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ include "oramap.fullname" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- toYaml .Values.ingress.tls | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/ora-map/templates/service.yaml b/charts/ora-map/templates/service.yaml new file mode 100644 index 0000000..da296c8 --- /dev/null +++ b/charts/ora-map/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "oramap.fullname" . }} + labels: + app: {{ include "oramap.name" . }} + chart: {{ include "oramap.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.containerPort }} + protocol: TCP + name: http + selector: + app: {{ include "oramap.name" . }} + release: {{ .Release.Name }} diff --git a/charts/ora-map/values.yaml b/charts/ora-map/values.yaml new file mode 100644 index 0000000..a110b9d --- /dev/null +++ b/charts/ora-map/values.yaml @@ -0,0 +1,22 @@ +replicaCount: 1 + +image: + repository: harbor.dvirlabs.com/shay/oramap + tag: "1" + pullPolicy: IfNotPresent + +containerPort: 3000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: true + className: "traefik" + hosts: + - host: oramap.dvirlabs.com + paths: + - path: / + pathType: Prefix + tls: [] diff --git a/manifests/ora-map/values.yaml b/manifests/ora-map/values.yaml new file mode 100644 index 0000000..a110b9d --- /dev/null +++ b/manifests/ora-map/values.yaml @@ -0,0 +1,22 @@ +replicaCount: 1 + +image: + repository: harbor.dvirlabs.com/shay/oramap + tag: "1" + pullPolicy: IfNotPresent + +containerPort: 3000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: true + className: "traefik" + hosts: + - host: oramap.dvirlabs.com + paths: + - path: / + pathType: Prefix + tls: []