From 690c3bf135cc9a13a44fb4c030c2ba902f02b482 Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Fri, 16 May 2025 11:47:12 +0300 Subject: [PATCH] Replace all to oramap --- argocd-apps/oramap.yaml | 21 ++++++++++++++ charts/oramap/.helmignore | 23 +++++++++++++++ charts/oramap/Chart.yaml | 24 ++++++++++++++++ charts/oramap/templates/_helpers.tpl | 11 +++++++ charts/oramap/templates/deployment.yaml | 38 +++++++++++++++++++++++++ charts/oramap/templates/ingress.yaml | 33 +++++++++++++++++++++ charts/oramap/templates/service.yaml | 19 +++++++++++++ charts/oramap/values.yaml | 22 ++++++++++++++ 8 files changed, 191 insertions(+) create mode 100644 argocd-apps/oramap.yaml create mode 100644 charts/oramap/.helmignore create mode 100644 charts/oramap/Chart.yaml create mode 100644 charts/oramap/templates/_helpers.tpl create mode 100644 charts/oramap/templates/deployment.yaml create mode 100644 charts/oramap/templates/ingress.yaml create mode 100644 charts/oramap/templates/service.yaml create mode 100644 charts/oramap/values.yaml diff --git a/argocd-apps/oramap.yaml b/argocd-apps/oramap.yaml new file mode 100644 index 0000000..cebd323 --- /dev/null +++ b/argocd-apps/oramap.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: oramap + namespace: argocd +spec: + project: my-apps + source: + repoURL: https://git.dvirlabs.com/dvirlabs/my-apps.git + targetRevision: HEAD + path: charts/oramap + helm: + valueFiles: + - ../../manifests/oramap/values.yaml + destination: + server: https://kubernetes.default.svc + namespace: my-apps + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/charts/oramap/.helmignore b/charts/oramap/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/oramap/.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/oramap/Chart.yaml b/charts/oramap/Chart.yaml new file mode 100644 index 0000000..c7a98b5 --- /dev/null +++ b/charts/oramap/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: oramap +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/oramap/templates/_helpers.tpl b/charts/oramap/templates/_helpers.tpl new file mode 100644 index 0000000..1767bb5 --- /dev/null +++ b/charts/oramap/templates/_helpers.tpl @@ -0,0 +1,11 @@ +{{- define "oramap.name" -}} +{{ .Chart.Name }} +{{- end }} + +{{- define "oramap.fullname" -}} +{{ include "oramap.name" . }}-{{ .Release.Name }} +{{- end }} + +{{- define "oramap.chart" -}} +{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} +{{- end }} \ No newline at end of file diff --git a/charts/oramap/templates/deployment.yaml b/charts/oramap/templates/deployment.yaml new file mode 100644 index 0000000..e6eff7f --- /dev/null +++ b/charts/oramap/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/oramap/templates/ingress.yaml b/charts/oramap/templates/ingress.yaml new file mode 100644 index 0000000..04dabe8 --- /dev/null +++ b/charts/oramap/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/oramap/templates/service.yaml b/charts/oramap/templates/service.yaml new file mode 100644 index 0000000..da296c8 --- /dev/null +++ b/charts/oramap/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/oramap/values.yaml b/charts/oramap/values.yaml new file mode 100644 index 0000000..a110b9d --- /dev/null +++ b/charts/oramap/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: []