Compare commits
8 Commits
9b79df1b0c
...
efe0e21d85
Author | SHA1 | Date |
---|---|---|
|
efe0e21d85 | |
|
fe8cec4075 | |
|
22a3df98c8 | |
|
9a6b440441 | |
|
6306426bed | |
|
ff645ddecd | |
|
3619d89003 | |
|
d6a6637aff |
|
@ -0,0 +1,16 @@
|
||||||
|
apiVersion: v2
|
||||||
|
name: ingress-management
|
||||||
|
description: A Helm chart to manage Ingress traffic
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0"
|
||||||
|
home: https://github.com/ot-container-kit/helm-charts
|
||||||
|
maintainers:
|
||||||
|
- name: sharvarikhamkar1304
|
||||||
|
keywords:
|
||||||
|
- ingress
|
||||||
|
- kong
|
||||||
|
- httpRoute
|
||||||
|
- kubernetes
|
||||||
|
icon: https://raw.githubusercontent.com/OT-CONTAINER-KIT/helm-charts/main/static/helm-chart-logo.svg
|
||||||
|
sources:
|
||||||
|
- https://github.com/ot-container-kit/helm-charts
|
|
@ -0,0 +1,49 @@
|
||||||
|
|
||||||
|
# Ingress Management Helm Chart
|
||||||
|
|
||||||
|
A simple and reusable Helm chart to manage Kubernetes Gateway API HTTPRoutes for routing traffic to backend services.
|
||||||
|
|
||||||
|
This chart helps manage HTTPRoute resources to expose services using the Kubernetes Gateway API. You can customize host, path, service, and namespace via values.
|
||||||
|
|
||||||
|
|
||||||
|
## Homepage
|
||||||
|
|
||||||
|
[https://github.com/ot-container-kit/helm-charts](https://github.com/ot-container-kit/helm-charts)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
| Name | URL |
|
||||||
|
| ---------------- | --------------------------------------------- |
|
||||||
|
| sharvari-khamkar | [GitHub](https://github.com/sharvari-khamkar) |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
|
||||||
|
[GitHub - ot-container-kit/helm-charts](https://github.com/ot-container-kit/helm-charts)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
| Repository | Name | Version |
|
||||||
|
| ------------------------------------------------------------------------------------------------ | ---- | ------- |
|
||||||
|
| [https://ot-container-kit.github.io/helm-charts](https://ot-container-kit.github.io/helm-charts) | base | 0.1.0 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| **Attribute** | **Scope** | **Example** | **Description** | **Default** |
|
||||||
|
|------------------|------------------|------------------------|------------------------------------------------------------------------|--------------|
|
||||||
|
| <br> `name` <br> <br> | <br> Global <br> <br> | <br> `"my-app"` <br> <br> | <br> Name of the HTTPRoute and backend service (the app name)<br><br> | `""` |
|
||||||
|
| <br> `namespace` <br> <br> | <br> Global <br> <br> | <br> `"default"` <br> <br> | <br> Kubernetes namespace where resources like HTTPRoute will be deployed<br><br> | `""` |
|
||||||
|
| <br> `host` <br> <br> | Routing | `"app.example.com"` | Hostname to expose the app<br><br> | `""` |
|
||||||
|
| <br>`path` <br> <br> | Routing | `"/api"` | Path under the host<br><br> | `""` |
|
||||||
|
| <br>`service.name` <br> <br> | Service Config | `"my-backend-svc"` | Name of the backend service to which traffic will be routed<br><br> | `""` |
|
||||||
|
| <br>`service.kind` <br> <br> | Service Config | `"Service"` | Kind of backend resource (Service by default)<br><br> | `"Service"` |
|
||||||
|
| <br>`service.port` <br> <br> | Service Config | `80` | Port on which the backend service listens<br><br> | `80` |
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
---
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: {{ required "A valid 'name' is required!" .Values.name }}
|
||||||
|
{{- if .Values.labels }}
|
||||||
|
labels:
|
||||||
|
{{ toYaml .Values.labels | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.annotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.parentRefs }}
|
||||||
|
parentRefs:
|
||||||
|
{{- range .Values.parentRefs }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
{{- if .namespace }}
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.hostnames }}
|
||||||
|
hostnames:
|
||||||
|
{{- range .Values.hostnames }}
|
||||||
|
- "{{ . }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
rules:
|
||||||
|
{{- range .Values.rules }}
|
||||||
|
- matches:
|
||||||
|
{{- range .matches }}
|
||||||
|
- path:
|
||||||
|
type: {{ .path.type }}
|
||||||
|
value: {{ .path.value | quote }}
|
||||||
|
{{- end }}
|
||||||
|
backendRefs:
|
||||||
|
{{- range .backendRefs }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
kind: {{ .kind | default "Service" }}
|
||||||
|
port: {{ .port }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,60 @@
|
||||||
|
---
|
||||||
|
# charts/ingress-management/values.yaml
|
||||||
|
|
||||||
|
# -- Name of the HTTPRoute and backend service (typically the app name)
|
||||||
|
name: ""
|
||||||
|
|
||||||
|
# -- Labels to apply to the HTTPRoute metadata
|
||||||
|
labels:
|
||||||
|
app: ""
|
||||||
|
|
||||||
|
# -- Optional annotations to apply to the HTTPRoute resource
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
# -- Reference to the Gateway (parentRefs)
|
||||||
|
parentRefs:
|
||||||
|
- name: ""
|
||||||
|
namespace: ""
|
||||||
|
# -- Hostnames to be matched in the HTTPRoute
|
||||||
|
hostnames:
|
||||||
|
- ""
|
||||||
|
|
||||||
|
# -- Routing rules for HTTPRoute
|
||||||
|
rules:
|
||||||
|
- matches:
|
||||||
|
- path:
|
||||||
|
type: PathPrefix
|
||||||
|
value: ""
|
||||||
|
backendRefs:
|
||||||
|
- name: ""
|
||||||
|
kind: Service
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Example values.yaml File
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# name: open-webui
|
||||||
|
|
||||||
|
# labels:
|
||||||
|
# app: open-webui
|
||||||
|
|
||||||
|
# annotations:
|
||||||
|
# konghq.com/protocols: https
|
||||||
|
# konghq.com/https-redirect-status-code: "301"
|
||||||
|
|
||||||
|
# parentRefs:
|
||||||
|
# - name: kong
|
||||||
|
# namespace: default
|
||||||
|
|
||||||
|
# hostnames:
|
||||||
|
# - bp-ai.opstree.dev
|
||||||
|
|
||||||
|
# rules:
|
||||||
|
# - matches:
|
||||||
|
# - path:
|
||||||
|
# type: PathPrefix
|
||||||
|
# value: /
|
||||||
|
# backendRefs:
|
||||||
|
# - name: open-webui
|
||||||
|
# kind: Service
|
||||||
|
# port: 80
|
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
name: microservice
|
name: microservice
|
||||||
description: Basic helm chart for deploying microservices on kubernetes with best practices
|
description: Basic helm chart for deploying microservices on kubernetes with best practices
|
||||||
type: application
|
type: application
|
||||||
version: 0.1.6
|
version: 0.1.8
|
||||||
appVersion: "0.1.2"
|
appVersion: "0.1.2"
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: ashwani-opstree
|
- name: ashwani-opstree
|
||||||
|
|
|
@ -33,7 +33,7 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with .Values.global.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -67,11 +67,11 @@ spec:
|
||||||
value: {{ $value | quote }}
|
value: {{ $value | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and .Values.deployment.healthProbes.enabled .Values.deployment.livenessProbe }}
|
{{- if and .Values.deployment.healthProbes.enabled .Values.deployment.livenessProbe.httpGet }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
{{- toYaml .Values.deployment.livenessProbe | nindent 12 }}
|
{{- toYaml .Values.deployment.livenessProbe | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and .Values.deployment.healthProbes.enabled .Values.deployment.readinessProbe }}
|
{{- if and .Values.deployment.healthProbes.enabled .Values.deployment.readinessProbe.httpGet }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
{{- toYaml .Values.deployment.readinessProbe | nindent 12 }}
|
{{- toYaml .Values.deployment.readinessProbe | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
apiVersion: v2
|
||||||
|
name: opentelemetry-chart
|
||||||
|
description: A Helm chart for OpenTelemetry configurations
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: 1.0.0
|
|
@ -0,0 +1,24 @@
|
||||||
|
{{- if .Values.serviceScrape.enabled }}
|
||||||
|
apiVersion: operator.victoriametrics.com/v1beta1
|
||||||
|
kind: VMServiceScrape
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- range $key, $value := .Values.serviceScrape.labels }}
|
||||||
|
{{ $key }}: {{ $value }}
|
||||||
|
{{- end }}
|
||||||
|
name: {{ .Values.serviceScrape.name }}
|
||||||
|
namespace: {{ .Values.serviceScrape.namespace }}
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- interval: {{ .Values.serviceScrape.endpoints.interval }}
|
||||||
|
path: {{ .Values.serviceScrape.endpoints.path }}
|
||||||
|
targetPort: {{ .Values.serviceScrape.endpoints.targetPort }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ .Values.serviceScrape.namespace }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- range $key, $value := .Values.serviceScrape.selector }}
|
||||||
|
{{ $key }}: {{ $value }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{{- if .Values.collector.enabled }}
|
||||||
|
apiVersion: opentelemetry.io/v1beta1
|
||||||
|
kind: OpenTelemetryCollector
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.collector.name }}
|
||||||
|
namespace: {{ .Values.collector.namespace }}
|
||||||
|
spec:
|
||||||
|
mode: {{ .Values.collector.mode }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: {{ .Values.collector.resources.requests.cpu }}
|
||||||
|
memory: {{ .Values.collector.resources.requests.memory }}
|
||||||
|
limits:
|
||||||
|
cpu: {{ .Values.collector.resources.limits.cpu }}
|
||||||
|
memory: {{ .Values.collector.resources.limits.memory }}
|
||||||
|
autoscaler:
|
||||||
|
minReplicas: {{ .Values.collector.autoscaler.minReplicas }}
|
||||||
|
maxReplicas: {{ .Values.collector.autoscaler.maxReplicas }}
|
||||||
|
targetCPUUtilization: {{ .Values.collector.autoscaler.targetCPUUtilization }}
|
||||||
|
targetMemoryUtilization: {{ .Values.collector.autoscaler.targetMemoryUtilization }}
|
||||||
|
config: {{ .Values.collector.config | toYaml | nindent 4 }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,29 @@
|
||||||
|
{{- if .Values.instrumentation.enabled }}
|
||||||
|
apiVersion: opentelemetry.io/v1alpha1
|
||||||
|
kind: Instrumentation
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.instrumentation.name }}
|
||||||
|
namespace: {{ .Values.instrumentation.namespace }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.instrumentation.exporter }}
|
||||||
|
exporter:
|
||||||
|
endpoint: {{ .Values.instrumentation.exporter.endpoint }}
|
||||||
|
{{- end }}
|
||||||
|
propagators:
|
||||||
|
{{- range .Values.instrumentation.propagators }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
sampler:
|
||||||
|
type: {{ .Values.instrumentation.sampler.type }}
|
||||||
|
argument: {{ .Values.instrumentation.sampler.argument | quote }}
|
||||||
|
{{- if .Values.instrumentation.languages }}
|
||||||
|
{{- range $language, $envs := .Values.instrumentation.languages }}
|
||||||
|
{{ $language }}:
|
||||||
|
env:
|
||||||
|
{{- range $envs }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
value: {{ .value }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,168 @@
|
||||||
|
instrumentation:
|
||||||
|
enabled: true
|
||||||
|
name: otel-instrumentation
|
||||||
|
namespace: observability
|
||||||
|
|
||||||
|
exporter:
|
||||||
|
endpoint: http://opentelemetry-collector.observability.svc.cluster.local:4317
|
||||||
|
|
||||||
|
propagators:
|
||||||
|
- tracecontext
|
||||||
|
- baggage
|
||||||
|
- b3
|
||||||
|
|
||||||
|
sampler:
|
||||||
|
type: parentbased_traceidratio
|
||||||
|
argument: "0.10"
|
||||||
|
|
||||||
|
languages:
|
||||||
|
python:
|
||||||
|
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
||||||
|
value: http://opentelemetry-collector.observability.svc.cluster.local:4318
|
||||||
|
dotnet:
|
||||||
|
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
||||||
|
value: http://opentelemetry-collector.observability.svc.cluster.local:4318
|
||||||
|
go:
|
||||||
|
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
||||||
|
value: http://opentelemetry-collector.observability.svc.cluster.local:4318
|
||||||
|
|
||||||
|
serviceScrape:
|
||||||
|
enabled: true
|
||||||
|
name: otel-collector-metrics-sm
|
||||||
|
namespace: observability
|
||||||
|
endpoints:
|
||||||
|
interval: 30s
|
||||||
|
path: /metrics
|
||||||
|
targetPort: 8888
|
||||||
|
labels:
|
||||||
|
app: otel-collector-metrics
|
||||||
|
exclude: "true"
|
||||||
|
prometheus: kube
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: opentelemetry-collector-monitoring
|
||||||
|
operator.opentelemetry.io/collector-service-type: monitoring
|
||||||
|
|
||||||
|
collector:
|
||||||
|
enabled: true
|
||||||
|
name: opentelemetry
|
||||||
|
namespace: observability
|
||||||
|
mode: deployment
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 0.5
|
||||||
|
memory: 500Mi
|
||||||
|
limits:
|
||||||
|
cpu: 0.5
|
||||||
|
memory: 500Mi
|
||||||
|
autoscaler:
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 10
|
||||||
|
targetCPUUtilization: 80
|
||||||
|
targetMemoryUtilization: 80
|
||||||
|
config: |
|
||||||
|
connectors:
|
||||||
|
spanmetrics:
|
||||||
|
dimensions:
|
||||||
|
- name: http.method
|
||||||
|
- name: http.status_code
|
||||||
|
- default: /
|
||||||
|
name: http.route
|
||||||
|
dimensions_cache_size: 1000
|
||||||
|
events:
|
||||||
|
dimensions:
|
||||||
|
- name: exception.type
|
||||||
|
- name: exception.message
|
||||||
|
enabled: true
|
||||||
|
exemplars:
|
||||||
|
enabled: true
|
||||||
|
metrics_expiration: 5m
|
||||||
|
metrics_flush_interval: 15s
|
||||||
|
exporters:
|
||||||
|
debug: {}
|
||||||
|
otlp:
|
||||||
|
endpoint: tempo:4317
|
||||||
|
tls:
|
||||||
|
insecure: true
|
||||||
|
prometheusremotewrite:
|
||||||
|
endpoint: http://vminsert-vm.monitoring.svc:8480/insert/0/prometheus/api/v1/write
|
||||||
|
export_created_metric:
|
||||||
|
enabled: true
|
||||||
|
max_batch_size_bytes: 8192
|
||||||
|
remote_write_queue:
|
||||||
|
enabled: true
|
||||||
|
num_consumers: 100
|
||||||
|
queue_size: 100000
|
||||||
|
retry_on_failure:
|
||||||
|
enabled: true
|
||||||
|
initial_interval: 5s
|
||||||
|
max_elapsed_time: 300s
|
||||||
|
max_interval: 30s
|
||||||
|
timeout: 300s
|
||||||
|
tls:
|
||||||
|
insecure_skip_verify: true
|
||||||
|
processors:
|
||||||
|
batch:
|
||||||
|
send_batch_max_size: 8192
|
||||||
|
send_batch_size: 1024
|
||||||
|
timeout: 60s
|
||||||
|
memory_limiter:
|
||||||
|
check_interval: 10s
|
||||||
|
limit_percentage: 75
|
||||||
|
spike_limit_percentage: 50
|
||||||
|
tail_sampling:
|
||||||
|
decision_wait: 60s
|
||||||
|
policies:
|
||||||
|
- name: error-policy
|
||||||
|
status_code:
|
||||||
|
status_codes:
|
||||||
|
- ERROR
|
||||||
|
type: status_code
|
||||||
|
- latency:
|
||||||
|
threshold_ms: 500
|
||||||
|
name: latency-policy
|
||||||
|
type: latency
|
||||||
|
- name: probabilistic
|
||||||
|
probabilistic:
|
||||||
|
sampling_percentage: 10
|
||||||
|
type: probabilistic
|
||||||
|
receivers:
|
||||||
|
otlp:
|
||||||
|
protocols:
|
||||||
|
grpc:
|
||||||
|
endpoint: 0.0.0.0:4317
|
||||||
|
keepalive:
|
||||||
|
server_parameters:
|
||||||
|
max_connection_age: 5m
|
||||||
|
max_connection_age_grace: 5m
|
||||||
|
max_connection_idle: 1m
|
||||||
|
time: 3m
|
||||||
|
timeout: 5m
|
||||||
|
http:
|
||||||
|
endpoint: 0.0.0.0:4318
|
||||||
|
service:
|
||||||
|
pipelines:
|
||||||
|
metrics:
|
||||||
|
exporters:
|
||||||
|
- debug
|
||||||
|
- prometheusremotewrite
|
||||||
|
processors:
|
||||||
|
- memory_limiter
|
||||||
|
- batch
|
||||||
|
receivers:
|
||||||
|
- spanmetrics
|
||||||
|
- otlp
|
||||||
|
traces:
|
||||||
|
exporters:
|
||||||
|
- debug
|
||||||
|
- otlp
|
||||||
|
- spanmetrics
|
||||||
|
processors:
|
||||||
|
- memory_limiter
|
||||||
|
- batch
|
||||||
|
- tail_sampling
|
||||||
|
receivers:
|
||||||
|
- otlp
|
||||||
|
telemetry:
|
||||||
|
metrics:
|
||||||
|
address: 0.0.0.0:8888
|
||||||
|
level: detailed
|
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
apiVersion: v2
|
||||||
|
description: A deployment helm chart which will be used to deploy any type of stateless application
|
||||||
|
maintainers:
|
||||||
|
- name: iamabhishek-dubey
|
||||||
|
email: "abhishek.dubey@opstree.com"
|
||||||
|
url: https://github.com/iamabhishek-dubey
|
||||||
|
name: worker
|
||||||
|
sources:
|
||||||
|
- https://github.com/ot-container-kit/helm-charts
|
||||||
|
dependencies:
|
||||||
|
- name: base
|
||||||
|
version: 0.1.0
|
||||||
|
repository: https://ot-container-kit.github.io/helm-charts
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "0.1.0"
|
||||||
|
home: https://github.com/ot-container-kit/helm-charts
|
||||||
|
keywords:
|
||||||
|
- deployment
|
||||||
|
- base
|
||||||
|
- opstree
|
||||||
|
- kubernetes
|
||||||
|
- openshift
|
||||||
|
- microservice
|
||||||
|
- stateless
|
||||||
|
icon: https://raw.githubusercontent.com/OT-CONTAINER-KIT/helm-charts/main/static/helm-chart-logo.svg
|
|
@ -0,0 +1,39 @@
|
||||||
|
# Worker Deployment Helm Chart
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
A deployment helm chart which will be used to deploy any type of stateless application
|
||||||
|
|
||||||
|
**Homepage:** <https://github.com/ot-container-kit/helm-charts>
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
| Name | Email | Url |
|
||||||
|
|-------------------|------------------------------|----------------------------------------|
|
||||||
|
| iamabhishek-dubey | <abhishek.dubey@opstree.com> | <https://github.com/iamabhishek-dubey> |
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
|
||||||
|
* <https://github.com/ot-container-kit/helm-charts>
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
| Repository | Name | Version |
|
||||||
|
|------------------------------------------------|------|---------|
|
||||||
|
| https://ot-container-kit.github.io/helm-charts | base | 0.1.0 |
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Key | Type | Default | Description |
|
||||||
|
|------------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|
|
||||||
|
| autoscaling | object | `{"enabled":false,"maxReplicas":50,"minReplicas":10,"targetCPUUtilizationPercentage":65,"targetMemoryUtilizationPercentage":65}` | Autoscaling properties with target CPU and Memory details |
|
||||||
|
| base | object | `{"image":{"command":[],"pullPolicy":"IfNotPresent","pullSecrets":"","repository":"nginx","tag":"latest"}}` | Base block to define the inputs for image, secret and configmap env |
|
||||||
|
| base.image | object | `{"command":[],"pullPolicy":"IfNotPresent","pullSecrets":"","repository":"nginx","tag":"latest"}` | Image block with all image details |
|
||||||
|
| base.image.command | list | `[]` | Additional command arguments which needs to be passed |
|
||||||
|
| base.image.pullPolicy | string | `"IfNotPresent"` | Default image pull policy |
|
||||||
|
| base.image.pullSecrets | string | `""` | Image pull secrets for private repository authentication |
|
||||||
|
| base.image.repository | string | `"nginx"` | Default image repository |
|
||||||
|
| base.image.tag | string | `"latest"` | Default image tag |
|
||||||
|
| replicaCount | int | `2` | Number of replicas for deployment, it will be overridden in case autoscaling is enabled |
|
||||||
|
| resources | object | `{}` | Kubernetes resource in terms of requests and limits |
|
||||||
|
| volumes | string | `nil` | Kubernetes volumes definition which needs to be mounted |
|
|
@ -0,0 +1,4 @@
|
||||||
|
{{ include "configmap" . }}
|
||||||
|
---
|
||||||
|
{{ include "serviceAccount" . }}
|
||||||
|
---
|
|
@ -0,0 +1,18 @@
|
||||||
|
{{- if .Values.volumes }}
|
||||||
|
{{- if .Values.volumes.configMaps }}
|
||||||
|
{{ range $cm := .Values.volumes.configMaps}}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ $cm.name }}
|
||||||
|
labels:
|
||||||
|
{{- include "base.labels" $ | nindent 4 }}
|
||||||
|
data:
|
||||||
|
{{- range $filename, $content := $cm.data }}
|
||||||
|
{{ $filename }}: |-
|
||||||
|
{{ $content | toString | indent 4}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,65 @@
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "base.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "base.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
{{- if not .Values.autoscaling.enabled }}
|
||||||
|
{{- with .Values.replicaCount }}
|
||||||
|
replicas: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "base.selectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "base.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.base.image.pullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.base.image.pullSecrets }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "base.serviceAccountName" . }}
|
||||||
|
terminationGracePeriodSeconds: 120
|
||||||
|
containers:
|
||||||
|
- name: {{ include "base.fullname" . }}
|
||||||
|
image: "{{ .Values.base.image.repository }}:{{ .Values.base.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.base.image.pullPolicy }}
|
||||||
|
{{- if .Values.base.image.command }}
|
||||||
|
command:
|
||||||
|
{{- toYaml .Values.base.image.command | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
{{- if .Values.base.config }}
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: {{ include "base.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.base.secret }}
|
||||||
|
- secretRef:
|
||||||
|
name: {{ include "base.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.volumes }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- if .Values.volumes.configMaps }}
|
||||||
|
{{- range $conf := .Values.volumes.configMaps }}
|
||||||
|
- mountPath: {{ $conf.mountPath }}
|
||||||
|
name: {{ $conf.name }}-volume
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.volumes }}
|
||||||
|
volumes:
|
||||||
|
{{- if .Values.volumes.configMaps }}
|
||||||
|
{{- range $conf := .Values.volumes.configMaps }}
|
||||||
|
- name: {{ $conf.name }}-volume
|
||||||
|
configMap:
|
||||||
|
name: {{ $conf.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,33 @@
|
||||||
|
{{- if .Values.autoscaling.enabled }}
|
||||||
|
---
|
||||||
|
apiVersion: autoscaling/v2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: {{ include "base.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "base.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: {{ include "base.fullname" . }}
|
||||||
|
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||||
|
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||||
|
metrics:
|
||||||
|
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: memory
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{{- if .Values.base.secret -}}
|
||||||
|
{{- $top := . -}}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ include "base.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "base.labels" . | nindent 4 }}
|
||||||
|
stringData:
|
||||||
|
{{- toYaml .Values.base.secret | nindent 2 -}}
|
||||||
|
{{- end -}}
|
|
@ -0,0 +1,43 @@
|
||||||
|
# -- Base block to define the inputs for image, secret and configmap env
|
||||||
|
base:
|
||||||
|
# -- Image block with all image details
|
||||||
|
image:
|
||||||
|
# -- Default image pull policy
|
||||||
|
pullPolicy: "IfNotPresent"
|
||||||
|
# -- Additional command arguments which needs to be passed
|
||||||
|
command: []
|
||||||
|
# -- Default image repository
|
||||||
|
repository: nginx
|
||||||
|
# -- Default image tag
|
||||||
|
tag: latest
|
||||||
|
# -- Image pull secrets for private repository authentication
|
||||||
|
pullSecrets: ""
|
||||||
|
# secret:
|
||||||
|
# FOO_SECRET: BAR
|
||||||
|
# config:
|
||||||
|
# FOO_CONFIG: BAR
|
||||||
|
|
||||||
|
|
||||||
|
# -- Autoscaling properties with target CPU and Memory details
|
||||||
|
autoscaling:
|
||||||
|
enabled: false
|
||||||
|
targetCPUUtilizationPercentage: 65
|
||||||
|
targetMemoryUtilizationPercentage: 65
|
||||||
|
minReplicas: 10
|
||||||
|
maxReplicas: 50
|
||||||
|
|
||||||
|
# -- Kubernetes resource in terms of requests and limits
|
||||||
|
resources: {}
|
||||||
|
|
||||||
|
# -- Number of replicas for deployment, it will be overridden in case autoscaling is enabled
|
||||||
|
replicaCount: 2
|
||||||
|
|
||||||
|
# -- Kubernetes volumes definition which needs to be mounted
|
||||||
|
volumes:
|
||||||
|
# -- List of configmaps with mount path and data
|
||||||
|
# configMaps:
|
||||||
|
# - name: web
|
||||||
|
# mountPath: /test
|
||||||
|
# data:
|
||||||
|
# test.txt: |-
|
||||||
|
# Dummy text
|
Loading…
Reference in New Issue