Skip to content

Commit 3692cc8

Browse files
authored
feat: smaller improvements to infra chart (#97)
* feat: using common value for istio/fga fixing test-values * chore: update infra * feat: improving tests * docs: update readme
1 parent e3b54b7 commit 3692cc8

10 files changed

+60
-51
lines changed

charts/infra/Chart.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies:
22
- name: common
33
repository: oci://ghcr.io/openmfp/helm-charts
4-
version: 0.1.7
5-
digest: sha256:45fcb4149403eb8b2774797e82e49d0e3969274393c8958ee6d3a0268e99ef76
6-
generated: "2024-12-06T10:05:31.423849254Z"
4+
version: 0.1.8
5+
digest: sha256:e4718b08670cce49ce9d031fb9a00b5e7b706c6629a4392b1244e501e42866a5
6+
generated: "2024-12-09T16:46:41.582356+01:00"

charts/infra/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ apiVersion: v2
22
name: infra
33
description: The infra openmfp chart configures a number of common infrastructure components for the OpenMFP platform.
44
type: application
5-
version: 0.58.0
5+
version: 0.59.0
66
appVersion: "1.16.0"
77

88
dependencies:
99
- name: common
10-
version: 0.1.7
10+
version: 0.1.8
1111
repository: oci://ghcr.io/openmfp/helm-charts

charts/infra/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The infra openmfp chart configures a number of common infrastructure components for the OpenMFP platform.
44

5-
![Version: 0.58.0](https://img.shields.io/badge/Version-0.58.0-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)
5+
![Version: 0.59.0](https://img.shields.io/badge/Version-0.59.0-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

77
## Additional Information
88

@@ -12,7 +12,7 @@ The `common` chart is a library of common resources that are shared across all o
1212

1313
| Repository | Name | Version |
1414
|------------|------|---------|
15-
| oci://ghcr.io/openmfp/helm-charts | common | 0.1.7 |
15+
| oci://ghcr.io/openmfp/helm-charts | common | 0.1.8 |
1616

1717
## Values
1818
| Key | Type | Default | Description |

charts/infra/charts/common-0.1.7.tgz

-4.4 KB
Binary file not shown.

charts/infra/charts/common-0.1.8.tgz

4.44 KB
Binary file not shown.

charts/infra/templates/fga-store.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if (.Values.fga).enabled }}
1+
{{- if eq (include "common.getNestedValue" (dict "Values" .Values "key" "fga.enabled")) "true" -}}
22
{{- range .Values.fga.stores }}
33
---
44
apiVersion: core.openmfp.io/v1alpha1

charts/infra/templates/gateway.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if eq (include "common.getKeyValue" (dict "Values" .Values "key" "istio.enabled")) "true" -}}
12
apiVersion: {{ .Values.istio.networking.apiVersion }}
23
kind: Gateway
34
metadata:
@@ -11,4 +12,5 @@ spec:
1112
selector:
1213
{{ .Values.istio.gateway.selector | toYaml | indent 4 }}
1314
servers:
14-
{{ toYaml .Values.istio.gateway.servers | indent 4 }}
15+
{{ toYaml .Values.istio.gateway.servers | indent 4 }}
16+
{{- end -}}

charts/infra/test-values.yaml

+32-35
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
1-
gateway:
2-
apiVersion: networking.istio.io/v1
3-
name: gateway
4-
selector:
5-
istio: gateway
6-
servers:
7-
- port:
8-
number: 8080
9-
name: http
10-
protocol: HTTP
11-
hosts:
12-
- "*"
1+
istio:
2+
enabled: true
3+
serviceEntries:
4+
https:
5+
enabled: true
6+
hosts: [ "example.com" ]
7+
gateway:
8+
apiVersion: networking.istio.io/v1
9+
name: gateway
10+
selector:
11+
istio: gateway
12+
servers:
13+
- port:
14+
number: 8080
15+
name: http
16+
protocol: HTTP
17+
hosts:
18+
- "*"
1319

14-
kcp:
15-
enabled: false
16-
# host: ""
17-
18-
auth:
19-
# host: ""
20-
21-
externalSecrets:
22-
accountOperatorSaKubeconfig: account-operator-sa-kubeconfig
23-
enabled: false
24-
25-
stores:
26-
- name: test
27-
namespace: test
28-
coreModuleName: |
29-
module core
30-
31-
type user
32-
33-
type account
34-
relations
35-
define owner: [user]
36-
define member: [user] or owner
20+
fga:
21+
enabled: true
22+
stores:
23+
- name: test
24+
namespace: test
25+
coreModuleName: |
26+
module core
27+
28+
type user
29+
30+
type account
31+
relations
32+
define owner: [user]
33+
define member: [user] or owner

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

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
matches the snapshot:
22
1: |
3+
apiVersion: core.openmfp.io/v1alpha1
4+
kind: Store
5+
metadata:
6+
name: test
7+
namespace: test
8+
spec:
9+
coreModule: |2-
10+
module core
11+
12+
type user
13+
14+
type account
15+
relations
16+
define owner: [user]
17+
define member: [user] or owner
18+
2: |
319
apiVersion: networking.istio.io/v1
420
kind: Gateway
521
metadata:
@@ -15,7 +31,7 @@ matches the snapshot:
1531
name: http
1632
number: 8080
1733
protocol: HTTP
18-
2: |
34+
3: |
1935
apiVersion: networking.istio.io/v1
2036
kind: ServiceEntry
2137
metadata:

charts/infra/tests/snapshot_test.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ values:
33
- ../test-values.yaml
44
tests:
55
- it: matches the snapshot
6-
set:
7-
istio:
8-
serviceEntries:
9-
https:
10-
enabled: true
11-
hosts: ["example.com"]
126
asserts:
137
- matchSnapshot: {}
148

0 commit comments

Comments
 (0)