more docs

This commit is contained in:
Stavros kois
2023-01-20 20:06:31 +02:00
parent 66c41ffd9f
commit 18b8544fd2
7 changed files with 114 additions and 38 deletions

View File

@@ -1,5 +1,7 @@
# Annotations
Annotations can be defined in nearly all resources.
## Key: addAnnotations
Info:

View File

@@ -1,15 +1,23 @@
# External Interfaces
## key: externalInterfaces
## Key: externalInterfaces
Info:
- Type: `list`
- Default: `[]`
- Helm Template: ❌
It's used in SCALE GUI. Configuration added in this key, is parsed from the middleware.
Middleware then injects 2 other `lists`. `ixExternalInterfacesConfiguration` and
`ixExternalInterfacesConfigurationNames`. Which are parsed from the Chart
to create the objects.
Can be defined in:
- `.Values`.externalInterfaces
---
It's used in SCALE GUI. Configuration added in this key (from the GUI),
is parsed from the middleware. Middleware then injects 2 other `lists`.
`ixExternalInterfacesConfiguration` and`ixExternalInterfacesConfigurationNames`.
Which are parsed from the Chart to create the objects.
Examples:

View File

@@ -1,5 +1,7 @@
# Labels
Labels can be defined in nearly all resources.
## Key: podLabels
Info:

View File

@@ -2,6 +2,8 @@
## key: probes
Info:
- Type: `dict`
- Default:
@@ -9,7 +11,40 @@
probes:
liveness:
enabled: true
type: AUTO
readiness:
enabled: true
startup:
enabled: true
```
- Helm Template:
- probes.PROBENAME.command - Single String: ✅
- probes.PROBENAME.command - List Entry: ✅
- probes.PROBENAME.port: ✅
- probes.PROBENAME.path: ✅
- probes.PROBENAME.httpHeaders.value: ✅
- probes.PROBENAME.httpHeaders.key: ❌
- probes.PROBENAME.enabled: ❌
- probes.PROBENAME.type: ❌
- probes.PROBENAME.spec: ❌
Can be defined in:
- `.Values`.probes
- `.Values.additionalContainers.[container-name]`.probes
---
With the above mentioned default and without defining anything else,
common will result in the following initial state of probes.
You can override every value, you don't have to rewrite every key.
Only the one's you want to change.
```yaml
probes:
liveness:
enabled: true
type: auto
# Optional
path: "/"
# Optional
@@ -26,7 +61,7 @@
failureThreshold: 5
readiness:
enabled: true
type: AUTO
type: auto
path: "/"
port: ""
command: []
@@ -37,7 +72,7 @@
failureThreshold: 5
startup:
enabled: true
type: AUTO
type: auto
path: "/"
port: ""
command: []
@@ -46,28 +81,24 @@
timeoutSeconds: 2
periodSeconds: 5
failureThreshold: 60
```
- Helm Template:
- probes.PROBENAME.command - Single String: ✅
- probes.PROBENAME.command - List Entry: ✅
- probes.PROBENAME.port: ✅
- probes.PROBENAME.path: ✅
- probes.PROBENAME.httpHeaders.value: ✅
- probes.PROBENAME.httpHeaders.key: ❌
- probes.PROBENAME.enabled: ❌
- probes.PROBENAME.type: ❌
- probes.PROBENAME.spec: ❌
```
`probes` key contains the probes for the container.
`liveness`, `readiness` and `startup` probes, behave the same.
Below examples will use `liveness`. But applies to all probes.
`AUTO` type, will automatically define a probe type and it's properties
`auto` type, will automatically define a probe type and it's properties
based on the `primary` service's `primary` port protocol.
> (Only available on main container)
- `HTTP` and `HTTPS` protocols, will result in `httpGet` probe
- `TCP` protocol, will result in `TCP` probe
`spec` contains the timeouts for the probe (or the custom probe).
If not defined it will use the defaults from `.Values.global.defaults.probes.[probe-name].spec`.
- `http` and `https` type, will result in `httpGet` probe
- `tcp` type, will result in `tcp` probe
- `exec` type, will result in a `exec` probe
- `grpc` type, will result in a `grpc` probe
- `custom` type, will require a 1:1 definition from k8s docs
`port` defaults to `targetPort` of `primary` service/port,
or `port` if `targetPort` is missing
@@ -75,7 +106,7 @@ or `port` if `targetPort` is missing
Example:
```yaml
# - AUTO Type
# - auto type
# Main service and main port is by default enabled and primary
service:
main:
@@ -85,18 +116,24 @@ service:
protocol: HTTP
targetPort: 80
# No need to define anything under probes
# it's set by default to AUTO
# as it defaults to auto
# ---
# - HTTP Probe
probes:
liveness:
type: HTTP # Defines the scheme
type: http # Defines the scheme
path: /health # Hardcoded
# path: "{{ .Values.some.path }}" # tpl
port: 80 # Hardcoded
# port: "{{ .Values.service.some_service.ports.some_port.targetPort }}" # tpl
# Headers - hardcoded
# httpHeaders:
# header: value
# Headers - tpl
# httpHeaders:
# header: "{{ .Values.some.path }}"
spec: # Only if you want to override the defaults
initialDelaySeconds: 10
timeoutSeconds: 2
@@ -106,21 +143,21 @@ probes:
# - TCP Probe
probes:
liveness:
type: TCP
type: tcp
port: 80 # Hardcoded
# port: "{{ .Values.service.some_service.ports.some_port.targetPort }}" # tpl
# - GRPC Probe
probes:
liveness:
type: GRPC
type: grpc
port: 80 # Hardcoded
# port: "{{ .Values.service.some_service.ports.some_port.targetPort }}" # tpl
# - EXEC Probe
probes:
liveness:
type: EXEC
type: exec
command: healthcheck.sh # Hardcoded
# command: "{{ .Values.healthcheck_command }}" # tpl
@@ -139,7 +176,7 @@ probes:
# Not recommended, above options should give all the flexibility needed.
probes:
liveness:
type: CUSTOM
type: custom
spec:
httpGet:
path: /

View File

@@ -2,6 +2,8 @@
## Key: resources
Info:
- Type: `dict`
- Default:
@@ -17,6 +19,18 @@
- Helm Template: ❌
Can be defined in:
- `.Values`.resources
- `.Values.additionalContainers.[container-name]`.resources
- `.Values.initContainers.[container-name]`.resources
- `.Values.installContainers.[container-name]`.resources
- `.Values.upgradeContainers.[container-name]`.resources
- `.Values.systemContainers.[container-name]`.resources
- `.Values.jobs.[job-name].podSpec.containers.[container-name].[container-name]`.resources
---
`requests` is used by the scheduler to decide if the node has enough
resources for the pod. Can be useful when multi node clusters are used.
Currently set to a very low value, so a pod can always be scheduled on
@@ -25,6 +39,8 @@ the single node.
`limits` is used to actually limit resources to a container. By default
is set to 4 cpu and 8GiB RAM.
You can define only what you want to change, and the rest will be pulled from defaults.
Examples:
```yaml

View File

@@ -2,10 +2,19 @@
## key: restartPolicy
Info:
- Type: `string`
- Default: `Always`
- Default((Cron)Job): `Never`
- Helm Template: ❌
Can be defined in:
- `.Values`.restartPolicy
---
Sets the container's restart policy.
Keys and sub keys:
@@ -16,6 +25,7 @@ restartPolicy:
```
`Deployment`, `StatefulSet`, `ReplicaSet` and `DaemonSet` only allows `Always`
`Job` and `CronJob` don't have that restriction.
Examples:
@@ -24,5 +34,5 @@ restartPolicy: OnFailure
restartPolicy: Never
restartPolicy: Never
restartPolicy: Always
```

View File

@@ -95,10 +95,7 @@ scaleCerts: {}
# Used for SCALE / GUI Focused
scaleCertsList: []
# - Everything bellow needs documentation
hostname: ""
# Defines the probes
probes:
liveness:
enabled: true
@@ -107,6 +104,9 @@ probes:
startup:
enabled: true
portal:
enabled: true
# Used for SCALE / GUI Focused
externalInterfaces: []
@@ -114,14 +114,15 @@ externalInterfaces: []
ixExternalInterfacesConfiguration: []
# Injected from middleware
ixExternalInterfacesConfigurationNames: []
# - Everything bellow needs documentation
hostname: ""
# Injected from middleware
ixCertificates: []
# Injected from middleware
ixVolumes: []
portal:
enabled: true
global:
nameOverride: ""
fullnameOverride: ""