mirror of
https://github.com/plcnk/charts.git
synced 2026-04-11 04:00:38 +00:00
feat(charts): Now using bjw-s's common library chart (#7)
This commit is contained in:
committed by
GitHub
parent
8a84b5e13a
commit
31bbf1ca94
6
charts/it-tools/Chart.lock
Normal file
6
charts/it-tools/Chart.lock
Normal file
@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://bjw-s.github.io/helm-charts
|
||||
version: 3.3.2
|
||||
digest: sha256:5a0f9f06aa383b7cc3070899b879401bcd4ae48b021d0a2b7f9ba39827019e24
|
||||
generated: "2024-08-15T17:47:53.312594+02:00"
|
||||
@ -4,7 +4,7 @@ description: Collection of handy online tools for developers, with great UX.
|
||||
home: https://github.com/plcnk/charts/tree/master/charts/it-tools
|
||||
icon: https://raw.githubusercontent.com/plcnk/charts/master/charts/it-tools/icon.svg
|
||||
type: application
|
||||
version: 1.0.5
|
||||
version: 2.0.0
|
||||
# renovate datasource=docker depName=ghcr.io/corentinth/it-tools
|
||||
appVersion: "2024.5.13-a0bc346"
|
||||
kubeVersion: ">=1.22.0-0"
|
||||
@ -12,12 +12,16 @@ keywords:
|
||||
- it-tools
|
||||
- it
|
||||
- tools
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://bjw-s.github.io/helm-charts
|
||||
version: 3.3.2
|
||||
sources:
|
||||
- https://github.com/CorentinTh/it-tools
|
||||
annotations:
|
||||
artifacthub.io/changes: |-
|
||||
- kind: changed
|
||||
description: Changed chart metadata
|
||||
description: Major chart overhaul. Now using bjw-s's common library chart.
|
||||
artifacthub.io/links: |-
|
||||
- name: App Source
|
||||
url: https://github.com/CorentinTh/it-tools
|
||||
|
||||
@ -1,16 +1,32 @@
|
||||
# IT-Tools
|
||||
# # it-tools
|
||||
|
||||
Helm chart for deploying [it-tools](https://it-tools.tech/).
|
||||
<img src="https://raw.githubusercontent.com/plcnk/charts/master/charts/it-tools/icon.svg" align="right" width="92" alt="it-tools logo">
|
||||
|
||||
it-tools is a collection of handy online tools for developers, with great UX.
|
||||

|
||||

|
||||

|
||||
|
||||
> [!NOTE]
|
||||
> This chart is not maintained by the original author of it-tools and any problems with this chart should be submitted [here](https://github.com/plcnk/charts/issues/new).
|
||||
Collection of handy online tools for developers, with great UX.
|
||||
|
||||
## Source code
|
||||
**Homepage:** <https://github.com/plcnk/charts/tree/master/charts/it-tools>
|
||||
|
||||
**This chart is not maintained by the upstream project and any issues with the chart should be raised
|
||||
[here](https://github.com/plcnk/charts/issues/new?assignees=plcnk&labels=bug&template=bug_report.yaml&name=it-tools&version=2.0.0)**
|
||||
|
||||
## Source Code
|
||||
|
||||
* <https://github.com/CorentinTh/it-tools>
|
||||
|
||||
## Requirements
|
||||
|
||||
Kubernetes: `>=1.22.0-0`
|
||||
|
||||
## Dependencies
|
||||
|
||||
| Repository | Name | Version |
|
||||
|------------|------|---------|
|
||||
| <https://bjw-s.github.io/helm-charts> | common | 3.3.2 |
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `it-tools`
|
||||
@ -39,80 +55,51 @@ helm uninstall it-tools
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release.
|
||||
|
||||
## Parameters
|
||||
## Configuration
|
||||
|
||||
### Global parameters
|
||||
Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values.
|
||||
Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common).
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------ | ---------------------------------------------- | ----- |
|
||||
| `replicaCount` | Number of replicas for the it-tools Deployment | `1` |
|
||||
| `imagePullSecrets` | Docker registry pull secrets | `[]` |
|
||||
| `nameOverride` | Name override | `""` |
|
||||
| `fullnameOverride` | Full name override | `""` |
|
||||
| `podAnnotations` | Additional annotations for the Pod resource | `{}` |
|
||||
| `podLabels` | Additional labels for the Pod resource | `{}` |
|
||||
| `nodeSelector` | Node labels for pod assignment | `{}` |
|
||||
| `tolerations` | Tolerations for pod assignment | `[]` |
|
||||
| `affinity` | Affinity for pod assignment | `{}` |
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
|
||||
|
||||
### Image parameters
|
||||
```console
|
||||
helm install it-tools \
|
||||
--set env.TZ="America/New York" \
|
||||
plcnk/it-tools
|
||||
```
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------ | ------------------------------------------------------------- | ----------------------------- |
|
||||
| `image.repository` | Docker image repository | `ghcr.io/corentinth/it-tools` |
|
||||
| `image.pullPolicy` | Docker image pull policy | `IfNotPresent` |
|
||||
| `image.tag` | Overrides the image tag whose default is the chart appVersion | `""` |
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
|
||||
|
||||
### Service account parameters
|
||||
```console
|
||||
helm install it-tools plcnk/it-tools -f values.yaml
|
||||
```
|
||||
|
||||
| Name | Description | Value |
|
||||
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `serviceAccount.create` | Specifies whether a service account should be created | `false` |
|
||||
| `serviceAccount.automount` | Automatically mount a ServiceAccount's API credentials? | `true` |
|
||||
| `serviceAccount.annotations` | Additional annotations for the ServiceAccount resource | `{}` |
|
||||
| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | `""` |
|
||||
## Custom configuration
|
||||
|
||||
### Security context parameters
|
||||
N/A
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------ | ----------------------------------------- | ---------------- |
|
||||
| `securityContext.capabilities.drop` | Capabilities to drop | `["ALL"]` |
|
||||
| `securityContext.readOnlyRootFilesystem` | If root filesystem should be read-only | `true` |
|
||||
| `securityContext.runAsNonRoot` | If pod should be run as non-root | `true` |
|
||||
| `securityContext.runAsUser` | User to run pod as | `10099` |
|
||||
| `securityContext.runAsGroup` | Group to run pod as | `10099` |
|
||||
| `securityContext.allowPrivilegeEscalation` | If privilege escalation should be allowed | `false` |
|
||||
| `securityContext.seccompProfile.type` | seccomp profile type | `RuntimeDefault` |
|
||||
## Values
|
||||
|
||||
### Service parameters
|
||||
**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common)
|
||||
|
||||
| Name | Description | Value |
|
||||
| -------------- | ---------------------- | ----------- |
|
||||
| `service.type` | Service type to create | `ClusterIP` |
|
||||
| `service.port` | Service port to use | `80` |
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| controllers.main.containers.app.env | object | See [values.yaml](./values.yaml) | Environment variables |
|
||||
| controllers.main.containers.app.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
|
||||
| controllers.main.containers.app.image.repository | string | `"ghcr.io/corentinth/it-tools"` | Image repository |
|
||||
| controllers.main.containers.app.image.tag | string | `"2024.5.13-a0bc346"` | Image tag |
|
||||
| controllers.main.containers.app.securityContext.allowPrivilegeEscalation | bool | `false` | Disable privilege escalations |
|
||||
| controllers.main.containers.app.securityContext.capabilities | object | `{"drop":["ALL"]}` | Drop all capabilities |
|
||||
| controllers.main.containers.app.securityContext.readOnlyRootFilesystem | bool | `true` | Mount the container's root filesystem as read-only |
|
||||
| controllers.main.pod.securityContext.fsGroup | int | `65534` | Volume binds will be granted to `nobody` group |
|
||||
| controllers.main.pod.securityContext.runAsGroup | int | `65534` | Run as `nobody` group |
|
||||
| controllers.main.pod.securityContext.runAsNonRoot | bool | `true` | Run container as a non-root user |
|
||||
| controllers.main.pod.securityContext.runAsUser | int | `65534` | Run as `nobody` user |
|
||||
| controllers.main.resources | object | `{}` | Set the resource requests / limits for the container. |
|
||||
| controllers.main.type | string | `"deployment"` | Controller type |
|
||||
| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. |
|
||||
| persistence | object | See [values.yaml](./values.yaml) | Configure persistence for the chart under this key. |
|
||||
| service | object | See [values.yaml](./values.yaml) | Configure the services for the chart here. |
|
||||
|
||||
### Ingress parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------- | ------------------------------------------------------------------------ | ------- |
|
||||
| `ingress.enabled` | Enable ingress record generation | `false` |
|
||||
| `ingress.className` | IngressClass that will be be used to implement the Ingress | `""` |
|
||||
| `ingress.annotations` | Additional annotations for the Ingress resource | `{}` |
|
||||
| `ingress.hosts` | An array with hostname(s) to be covered with the ingress record | `[]` |
|
||||
| `ingress.tls` | TLS configuration for hostname(s) to be covered with this ingress record | `[]` |
|
||||
|
||||
### Resources parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ----------- | -------------------- | ----- |
|
||||
| `resources` | Kubernetes resources | `{}` |
|
||||
|
||||
### Autoscaling parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ----------------------------------------------- | ------------------------------------ | ------- |
|
||||
| `autoscaling.enabled` | Enable Horizontal POD autoscaling | `false` |
|
||||
| `autoscaling.minReplicas` | Minimum number of replicas | `1` |
|
||||
| `autoscaling.maxReplicas` | Maximum number of replicas | `100` |
|
||||
| `autoscaling.targetCPUUtilizationPercentage` | Target CPU utilization percentage | `80` |
|
||||
| `autoscaling.targetMemoryUtilizationPercentage` | Target Memory utilization percentage | `80` |
|
||||
---
|
||||
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)
|
||||
|
||||
13
charts/it-tools/README_CONFIG.md.gotmpl
Normal file
13
charts/it-tools/README_CONFIG.md.gotmpl
Normal file
@ -0,0 +1,13 @@
|
||||
{{- define "custom.chart.name" -}}
|
||||
# {{ .Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.custom.configuration.header" -}}
|
||||
## Custom configuration
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.custom.configuration" -}}
|
||||
{{ template "custom.custom.configuration.header" . }}
|
||||
|
||||
N/A
|
||||
{{- end -}}
|
||||
@ -1,62 +0,0 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "it-tools.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 "it-tools.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 "it-tools.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "it-tools.labels" -}}
|
||||
helm.sh/chart: {{ include "it-tools.chart" . }}
|
||||
{{ include "it-tools.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "it-tools.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "it-tools.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "it-tools.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "it-tools.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
93
charts/it-tools/templates/common.yaml
Normal file
93
charts/it-tools/templates/common.yaml
Normal file
@ -0,0 +1,93 @@
|
||||
{{/* Append the hardcoded settings */}}
|
||||
{{- define "it-tools.harcodedValues" -}}
|
||||
configMaps:
|
||||
nginx-conf:
|
||||
enabled: true
|
||||
data:
|
||||
nginx.conf: |
|
||||
worker_processes auto;
|
||||
|
||||
error_log /tmp/nginx/error.log warn;
|
||||
pid /tmp/nginx/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
persistence:
|
||||
cache:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
advancedMounts:
|
||||
main:
|
||||
app:
|
||||
- path: /var/cache/nginx
|
||||
tmp:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
advancedMounts:
|
||||
main:
|
||||
app:
|
||||
- path: /tmp/nginx
|
||||
nginx-conf:
|
||||
enabled: true
|
||||
type: configMap
|
||||
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}-nginx-conf
|
||||
advancedMounts:
|
||||
main:
|
||||
app:
|
||||
- path: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
|
||||
controllers:
|
||||
main:
|
||||
containers:
|
||||
app:
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
protocol: TCP
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
custom: true
|
||||
spec:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 30
|
||||
readiness:
|
||||
enabled: true
|
||||
custom: true
|
||||
spec:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 30
|
||||
{{- end -}}
|
||||
|
||||
{{- $tmplVars := deepCopy . -}}
|
||||
{{ include "bjw-s.common.loader.init" $tmplVars }}
|
||||
{{- $defaultValues := include "it-tools.harcodedValues" $tmplVars | fromYaml -}}
|
||||
{{- $_ := mustMerge .Values $defaultValues -}}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "bjw-s.common.loader.init" . }}
|
||||
{{ include "bjw-s.common.loader.generate" . }}
|
||||
@ -1,29 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-conf
|
||||
data:
|
||||
nginx.conf: |
|
||||
worker_processes auto;
|
||||
|
||||
error_log /tmp/nginx/error.log warn;
|
||||
pid /tmp/nginx/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,82 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "it-tools.fullname" . }}
|
||||
labels:
|
||||
{{- include "it-tools.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "it-tools.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "it-tools.labels" . | nindent 8 }}
|
||||
{{- with .Values.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "it-tools.serviceAccountName" . }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 30
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: cache
|
||||
mountPath: "/var/cache/nginx"
|
||||
- name: tmp
|
||||
mountPath: "/tmp/nginx"
|
||||
- name: conf
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
volumes:
|
||||
- name: cache
|
||||
emptyDir: {}
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
- name: conf
|
||||
configMap:
|
||||
name: nginx-conf
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@ -1,32 +0,0 @@
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "it-tools.fullname" . }}
|
||||
labels:
|
||||
{{- include "it-tools.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "it-tools.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 }}
|
||||
@ -1,61 +0,0 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "it-tools.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
|
||||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "it-tools.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "it-tools.fullname" . }}
|
||||
labels:
|
||||
{{- include "it-tools.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "it-tools.selectorLabels" . | nindent 4 }}
|
||||
@ -1,13 +0,0 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "it-tools.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "it-tools.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
|
||||
{{- end }}
|
||||
@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ include "it-tools.fullname" . }}-test-connection"
|
||||
labels:
|
||||
{{- include "it-tools.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
containers:
|
||||
- name: wget
|
||||
image: busybox
|
||||
command: ['wget']
|
||||
args: ['{{ include "it-tools.fullname" . }}:{{ .Values.service.port }}']
|
||||
restartPolicy: Never
|
||||
@ -1,128 +1,95 @@
|
||||
# Default values for it-tools.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
---
|
||||
#
|
||||
# IMPORTANT NOTE
|
||||
#
|
||||
# This chart inherits from our common library chart. You can check the default values/options here:
|
||||
# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml
|
||||
#
|
||||
|
||||
## @section Global parameters
|
||||
## @param replicaCount Number of replicas for the it-tools Deployment
|
||||
replicaCount: 1
|
||||
controllers:
|
||||
main:
|
||||
# -- Controller type
|
||||
type: deployment
|
||||
containers:
|
||||
app:
|
||||
image:
|
||||
# -- Image repository
|
||||
repository: ghcr.io/corentinth/it-tools
|
||||
# -- Image pull policy
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Image tag
|
||||
tag: 2024.5.13-a0bc346
|
||||
|
||||
## @param imagePullSecrets Docker registry pull secrets
|
||||
## @param nameOverride Name override
|
||||
## @param fullnameOverride Full name override
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
# -- Environment variables
|
||||
# @default -- See [values.yaml](./values.yaml)
|
||||
env: {}
|
||||
# TZ: UTC
|
||||
|
||||
## @param podAnnotations Additional annotations for the Pod resource
|
||||
## @param podLabels Additional labels for the Pod resource
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
securityContext:
|
||||
# -- Mount the container's root filesystem as read-only
|
||||
readOnlyRootFilesystem: true
|
||||
# -- Disable privilege escalations
|
||||
allowPrivilegeEscalation: false
|
||||
# -- Drop all capabilities
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
|
||||
## @param nodeSelector Node labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
|
||||
nodeSelector: {}
|
||||
pod:
|
||||
securityContext:
|
||||
# -- Run container as a non-root user
|
||||
runAsNonRoot: true
|
||||
# -- Run as `nobody` user
|
||||
runAsUser: 65534
|
||||
# -- Run as `nobody` group
|
||||
runAsGroup: 65534
|
||||
# -- Volume binds will be granted to `nobody` group
|
||||
fsGroup: 65534
|
||||
|
||||
## @param tolerations Tolerations for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
tolerations: []
|
||||
# -- Set the resource requests / limits for the container.
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## @param affinity Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
affinity: {}
|
||||
|
||||
## @section Image parameters
|
||||
## @param image.repository Docker image repository
|
||||
## @param image.pullPolicy Docker image pull policy
|
||||
## @param image.tag Overrides the image tag whose default is the chart appVersion
|
||||
image:
|
||||
repository: ghcr.io/corentinth/it-tools
|
||||
pullPolicy: IfNotPresent
|
||||
tag: ""
|
||||
|
||||
## @section Service account parameters
|
||||
## @param serviceAccount.create Specifies whether a service account should be created
|
||||
## @param serviceAccount.automount Automatically mount a ServiceAccount's API credentials?
|
||||
## @param serviceAccount.annotations Additional annotations for the ServiceAccount resource
|
||||
## @param serviceAccount.name The name of the service account to use. If not set and create is true, a name is generated using the fullname template
|
||||
serviceAccount:
|
||||
create: false
|
||||
automount: true
|
||||
annotations: {}
|
||||
name: ""
|
||||
|
||||
## @section Security context parameters
|
||||
## @param securityContext.capabilities.drop Capabilities to drop
|
||||
## @param securityContext.readOnlyRootFilesystem If root filesystem should be read-only
|
||||
## @param securityContext.runAsNonRoot If pod should be run as non-root
|
||||
## @param securityContext.runAsUser User to run pod as
|
||||
## @param securityContext.runAsGroup Group to run pod as
|
||||
## @param securityContext.allowPrivilegeEscalation If privilege escalation should be allowed
|
||||
## @param securityContext.seccompProfile.type seccomp profile type
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
runAsUser: 10099
|
||||
runAsGroup: 10099
|
||||
allowPrivilegeEscalation: false
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
|
||||
## @section Service parameters
|
||||
## @param service.type Service type to create
|
||||
## @param service.port Service port to use
|
||||
# -- Configure the services for the chart here.
|
||||
# @default -- See [values.yaml](./values.yaml)
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: 80
|
||||
|
||||
# -- Configure persistence for the chart under this key.
|
||||
# @default -- See [values.yaml](./values.yaml)
|
||||
persistence:
|
||||
data:
|
||||
enabled: false
|
||||
retain: true
|
||||
# storageClass: ""
|
||||
# accessMode: ReadWriteOnce
|
||||
# size: 1Gi
|
||||
|
||||
## @section Ingress parameters
|
||||
## Configure the ingress resource that allows you to access the installation
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
|
||||
##
|
||||
## @param ingress.enabled Enable ingress record generation
|
||||
## @param ingress.className IngressClass that will be be used to implement the Ingress
|
||||
## @param ingress.annotations Additional annotations for the Ingress resource
|
||||
## @param ingress.hosts An array with hostname(s) to be covered with the ingress record
|
||||
## @param ingress.tls TLS configuration for hostname(s) to be covered with this ingress record
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts: []
|
||||
# - host: it-tools.example.local
|
||||
# paths:
|
||||
# - path: /
|
||||
# pathType: Prefix
|
||||
tls: []
|
||||
# - secretName: it-tools-tls
|
||||
# hosts:
|
||||
# - it-tools.example.local
|
||||
|
||||
## @section Resources parameters
|
||||
## @param resources Kubernetes resources
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## @section Autoscaling parameters
|
||||
## Autoscaling parameters
|
||||
## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
|
||||
## @param autoscaling.enabled Enable Horizontal POD autoscaling
|
||||
## @param autoscaling.minReplicas Minimum number of replicas
|
||||
## @param autoscaling.maxReplicas Maximum number of replicas
|
||||
## @param autoscaling.targetCPUUtilizationPercentage Target CPU utilization percentage
|
||||
## @param autoscaling.targetMemoryUtilizationPercentage Target Memory utilization percentage
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
targetMemoryUtilizationPercentage: 80
|
||||
# -- Enable and configure ingress settings for the chart under this key.
|
||||
# @default -- See [values.yaml](./values.yaml)
|
||||
main:
|
||||
enabled: false
|
||||
# className: ""
|
||||
# annotations: {}
|
||||
# hosts:
|
||||
# - host: &host-main "chart-example.local"
|
||||
# paths:
|
||||
# - path: /
|
||||
# pathType: Prefix
|
||||
# service:
|
||||
# identifier: main
|
||||
# port: http
|
||||
# tls:
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - *host-main
|
||||
|
||||
Reference in New Issue
Block a user