Skip to content

Commit 22ec749

Browse files
committed
feat: improving documentation and smaller refactoring
1 parent 90466b8 commit 22ec749

12 files changed

+73
-188
lines changed

charts/infra/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
name: infra
3-
description: A Helm chart for Kubernetes
3+
description: The infra openmfp chart configures a number of common infrastructure components for the OpenMFP platform.
44
type: application
5-
version: 0.57.6
5+
version: 0.58.0
66
appVersion: "1.16.0"
77

88
dependencies:

charts/infra/README.md

+15-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# infra
22

3-
A Helm chart for Kubernetes
3+
The infra openmfp chart configures a number of common infrastructure components for the OpenMFP platform.
44

55
![Version: 0.57.6](https://img.shields.io/badge/Version-0.57.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
66

@@ -15,6 +15,20 @@ The `common` chart is a library of common resources that are shared across all o
1515
| oci://ghcr.io/openmfp/helm-charts | common | 0.1.7 |
1616

1717
## Values
18+
| Key | Type | Default | Description |
19+
|-----|------|---------|-------------|
20+
| fga.enabled | bool | `true` | An experimental toggle to enable the FGA integration |
21+
| fga.stores | list | `[]` | The list of FGA stores to be created |
22+
| istio.gateway.annotations | object | `{}` | Annotations to be applied to the istio gateway |
23+
| istio.gateway.apiVersion | string | `nil` | The istio apiVersion of the gateway resource eg, networking.istio.io/v1, networking.istio.io/v1beta1 |
24+
| istio.gateway.name | string | `"gateway"` | The name of the istio gateway resource |
25+
| istio.gateway.selector.istio | string | `"gateway"` | The istio ingress gateway selector |
26+
| istio.gateway.servers | list | `[{"hosts":["*"],"port":{"name":"http","number":8080,"protocol":"HTTP"}}]` | The "servers" section of the istio gateway. By default it is configured for a local kind setup. Adjust to be a https port for productive deployments |
27+
| istio.networking.apiVersion | string | `"networking.istio.io/v1"` | The istio apiVersion used for networking resources in this chart eg. networking.istio.io/v1, networking.istio.io/v1beta1 |
28+
| istio.serviceEntries.https.enabled | bool | `false` | A toggle to enable the service entries for external https communication |
29+
| istio.serviceEntries.https.hosts | list | `[]` | The list of hosts to be added to the service entry |
30+
31+
## Overriding Values
1832

1933
The values in the `defaults:` section can be reused from other charts by using the lookup function "common.getKeyValue". It implements lookup on three levels:
2034

@@ -32,22 +46,3 @@ Example
3246
3) .Values.deployment.resources.limits.memory = 1024MB
3347
4) .Values.common.defaults.deployment.resources.limits.memory = default 512MB
3448
```
35-
36-
| Key | Type | Default | Description |
37-
|-----|------|---------|-------------|
38-
| certificate.gardener.enabled | bool | `false` | |
39-
| externalSecrets.accountOperatorSaKubeconfig | string | `"account-operator-sa-kubeconfig"` | |
40-
| fga.enabled | bool | `true` | |
41-
| fga.stores | list | `[]` | |
42-
| gateway.annotations | object | `{}` | |
43-
| gateway.apiVersion | string | `"networking.istio.io/v1"` | |
44-
| gateway.name | string | `"gateway"` | |
45-
| gateway.selector.istio | string | `"gateway"` | |
46-
| gateway.servers[0].hosts[0] | string | `"*"` | |
47-
| gateway.servers[0].port.name | string | `"http"` | |
48-
| gateway.servers[0].port.number | int | `8080` | |
49-
| gateway.servers[0].port.protocol | string | `"HTTP"` | |
50-
| kcp.enabled | bool | `false` | |
51-
| keycloak.enabled | bool | `false` | |
52-
| keycloak.hosts[0] | string | `"login.microsoftonline.com"` | |
53-
| rbac.clusterRole.enabled | bool | `false` | |

charts/infra/README.md.gotmpl

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ The `common` chart is a library of common resources that are shared across all o
1010
{{ template "chart.requirementsSection" . }}
1111

1212
{{ template "chart.valuesHeader" . }}
13+
{{ template "chart.valuesTable" . }}
14+
15+
## Overriding Values
1316

1417
The values in the `defaults:` section can be reused from other charts by using the lookup function "common.getKeyValue". It implements lookup on three levels:
1518

@@ -20,12 +23,10 @@ The values in the `defaults:` section can be reused from other charts by using t
2023

2124
1 has precendence over 2 over 3 over 4 respectively. This approach allows for individual charts to have minimal configuration, while still being able to override parameters locally.
2225

23-
Example
26+
Example
2427
```
2528
1) .Values.deployment.resources.limits.memoryOveride = 4096MB
2629
2) .Values.global.deployment.resources.limits.memory = 2048MB
2730
3) .Values.deployment.resources.limits.memory = 1024MB
2831
4) .Values.common.defaults.deployment.resources.limits.memory = default 512MB
2932
```
30-
31-
{{ template "chart.valuesTable" . }}

charts/infra/templates/cluster-role.yaml

-30
This file was deleted.

charts/infra/templates/external-secret-account-operator.yaml

-22
This file was deleted.
File renamed without changes.

charts/infra/templates/gateway.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
apiVersion: {{ .Values.gateway.apiVersion }}
1+
apiVersion: {{ .Values.istio.networking.apiVersion }}
22
kind: Gateway
33
metadata:
4-
name: {{ .Values.gateway.name}}
4+
name: {{ .Values.istio.gateway.name}}
55
namespace: {{ .Release.Namespace }}
6-
{{- if .Values.gateway.annotations }}
6+
{{- if .Values.istio.gateway.annotations }}
77
annotations:
8-
{{- toYaml .Values.gateway.annotations | nindent 4 }}
8+
{{- toYaml .Values.istio.gateway.annotations | nindent 4 }}
99
{{- end }}
1010
spec:
1111
selector:
12-
{{ .Values.gateway.selector | toYaml | indent 4 }}
12+
{{ .Values.istio.gateway.selector | toYaml | indent 4 }}
1313
servers:
14-
{{ toYaml .Values.gateway.servers | indent 4 }}
14+
{{ toYaml .Values.istio.gateway.servers | indent 4 }}

charts/infra/templates/kcp-service-entry.yaml

-16
This file was deleted.

charts/infra/templates/keycloak-service-entry.yaml

-15
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{ if .Values.istio.serviceEntries.https.enabled -}}
2+
apiVersion: {{ .Values.istio.networking.apiVersion }}
3+
kind: ServiceEntry
4+
metadata:
5+
name: openmfp-https
6+
namespace: {{ .Release.Namespace }}
7+
spec:
8+
hosts:
9+
{{ .Values.istio.serviceEntries.https.hosts | toYaml | nindent 4 }}
10+
location: MESH_EXTERNAL
11+
ports:
12+
- name: https
13+
number: 443
14+
protocol: TLS
15+
resolution: DNS
16+
{{- end -}}

charts/infra/tests/__snapshot__/snapshot_test.yaml.snap

-42
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
disables externalsecrets:
22
1: |
3-
apiVersion: external-secrets.io/v1beta1
4-
kind: ExternalSecret
5-
metadata:
6-
name: account-operator-sa-kubeconfig
7-
namespace: NAMESPACE
8-
spec:
9-
data:
10-
- remoteRef:
11-
conversionStrategy: Default
12-
key: null
13-
property: kubeconfig
14-
secretKey: kubeconfig
15-
refreshInterval: 10m
16-
secretStoreRef:
17-
kind: SecretStore
18-
name: environment-store
19-
target:
20-
creationPolicy: Owner
21-
deletionPolicy: Retain
22-
name: account-operator-sa-kubeconfig
23-
2: |
243
apiVersion: networking.istio.io/v1
254
kind: Gateway
265
metadata:
@@ -38,27 +17,6 @@ disables externalsecrets:
3817
protocol: HTTP
3918
matches the snapshot:
4019
1: |
41-
apiVersion: external-secrets.io/v1beta1
42-
kind: ExternalSecret
43-
metadata:
44-
name: account-operator-sa-kubeconfig
45-
namespace: NAMESPACE
46-
spec:
47-
data:
48-
- remoteRef:
49-
conversionStrategy: Default
50-
key: account-operator-sa-kubeconfig
51-
property: kubeconfig
52-
secretKey: kubeconfig
53-
refreshInterval: 10m
54-
secretStoreRef:
55-
kind: SecretStore
56-
name: environment-store
57-
target:
58-
creationPolicy: Owner
59-
deletionPolicy: Retain
60-
name: account-operator-sa-kubeconfig
61-
2: |
6220
apiVersion: networking.istio.io/v1
6321
kind: Gateway
6422
metadata:

charts/infra/values.yaml

+30-32
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
1-
gateway:
2-
annotations: {}
3-
apiVersion: networking.istio.io/v1
4-
name: gateway
5-
selector:
6-
istio: gateway
7-
servers:
8-
- port:
9-
number: 8080
10-
name: http
11-
protocol: HTTP
12-
hosts:
13-
- "*"
14-
15-
rbac:
16-
clusterRole:
17-
enabled: false
18-
19-
kcp:
20-
enabled: false
21-
# host: ""
22-
23-
keycloak:
24-
enabled: false
25-
hosts:
26-
- "login.microsoftonline.com"
27-
28-
externalSecrets:
29-
accountOperatorSaKubeconfig: account-operator-sa-kubeconfig
1+
istio:
2+
networking:
3+
# -- The istio apiVersion used for networking resources in this chart eg. networking.istio.io/v1, networking.istio.io/v1beta1
4+
apiVersion: networking.istio.io/v1
5+
gateway:
6+
# -- Annotations to be applied to the istio gateway
7+
annotations: {}
8+
# -- The istio apiVersion of the gateway resource eg, networking.istio.io/v1, networking.istio.io/v1beta1
9+
apiVersion:
10+
# -- The name of the istio gateway resource
11+
name: gateway
12+
selector:
13+
# -- The istio ingress gateway selector
14+
istio: gateway
15+
# -- The "servers" section of the istio gateway. By default it is configured for a local kind setup. Adjust to be a https port for productive deployments
16+
servers:
17+
- port:
18+
number: 8080
19+
name: http
20+
protocol: HTTP
21+
hosts:
22+
- "*"
23+
serviceEntries:
24+
https:
25+
# -- A toggle to enable the service entries for external https communication
26+
enabled: false
27+
# -- The list of hosts to be added to the service entry
28+
hosts: []
3029

3130
fga:
31+
# -- An experimental toggle to enable the FGA integration
3232
enabled: true
33+
# -- The list of FGA stores to be created
3334
stores: []
3435

35-
certificate:
36-
gardener:
37-
enabled: false

0 commit comments

Comments
 (0)