Skip to content

Commit

Permalink
change defaults for example-content
Browse files Browse the repository at this point in the history
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
  • Loading branch information
akafazov committed Feb 12, 2025
1 parent b0afdd4 commit 837096d
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 16 deletions.
6 changes: 3 additions & 3 deletions charts/example-content/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: oci://ghcr.io/openmfp/helm-charts
version: 0.2.8
digest: sha256:88e8d528b6fcc70a9fb622aad43a0d896814acd2100d431c98b9603865dcc50a
generated: "2025-02-10T18:48:39.924098819Z"
version: 0.2.9
digest: sha256:3ec6cdc8436e1e02b0f5ca64842f4f7559adbc6998124d7864d51143071ef569
generated: "2025-02-12T15:44:26.260004137+02:00"
4 changes: 2 additions & 2 deletions charts/example-content/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
appVersion: "0.151.0"
description: Helm Chart for the openmfp Portal
name: example-content
version: 0.113.8
version: 0.114.0
dependencies:
- name: common
version: 0.2.8
version: 0.2.9
repository: oci://ghcr.io/openmfp/helm-charts
10 changes: 6 additions & 4 deletions charts/example-content/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ Helm Chart for the openmfp Portal
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| contentConfigurations.ui | object | `{"enabled":true,"url":"http://localhost:8000/ui/example-content/ui/assets/config.json"}` | This content configuration enables a basic homepage in the portal |
| contentConfigurations.ui | object | `{"enabled":true,"internalUrl":"http://openmfp-example-content.openmfp-system.svc.cluster.local:8080/ui/assets/config.json","url":"http://localhost:8000/ui/example-content/ui/assets/config.json"}` | This content configuration enables a basic homepage in the portal |
| contentConfigurations.wc.enabled | bool | `true` | |
| contentConfigurations.wc.internalUrl | string | `"http://openmfp-example-content.openmfp-system.svc.cluster.local:8080/wc/assets/config.json"` | |
| contentConfigurations.wc.url | string | `"http://localhost:8000/ui/example-content/wc/assets/config.json"` | |
| contentProtocolDomain | string | `"https://example-content.some-domain.com"` | |
| image.name | string | `"ghcr.io/openmfp/example-content"` | The image name |
| istio.virtualService.hosts[0] | string | `"your-host.com"` | |
| istio.virtualService.matchers[0].match[0].uri.exact | string | `"/ui/example-content"` | |
| istio.virtualService.matchers[0].match[1].uri.prefix | string | `"/ui/example-content/"` | |
| istio.enabled | bool | `true` | |
| istio.virtualService.hosts[0] | string | `"*"` | |
| istio.virtualService.matchers[0].match[0].uri.prefix | string | `"/ui/example-content"` | |
| istio.virtualService.matchers[0].rewrite.uri | string | `"/"` | |

## Overriding Values

Expand Down
Binary file removed charts/example-content/charts/common-0.2.8.tgz
Binary file not shown.
Binary file added charts/example-content/charts/common-0.2.9.tgz
Binary file not shown.
51 changes: 49 additions & 2 deletions charts/example-content/tests/__snapshot__/snapshot_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ matches the snapshot:
spec:
remoteConfiguration:
contentType: json
internalUrl: http://openmfp-example-content.openmfp-system.svc.cluster.local:8080/ui/assets/config.json
url: http://localhost:8000/ui/example-content/ui/assets/config.json
2: |
apiVersion: core.openmfp.io/v1alpha1
Expand All @@ -22,6 +23,7 @@ matches the snapshot:
spec:
remoteConfiguration:
contentType: json
internalUrl: http://openmfp-example-content.openmfp-system.svc.cluster.local:8080/wc/assets/config.json
url: http://localhost:8000/ui/example-content/wc/assets/config.json
3: |
apiVersion: apps/v1
Expand Down Expand Up @@ -91,14 +93,36 @@ matches the snapshot:
- emptyDir: {}
name: run-volume
4: |
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: RELEASE-NAME-example-content
namespace: NAMESPACE
spec:
gateways:
- NAMESPACE/gateway
hosts:
- '*'
http:
- match:
- uri:
prefix: /ui/example-content
rewrite:
uri: /
route:
- destination:
host: RELEASE-NAME-example-content.NAMESPACE.svc.cluster.local
port:
number: 8080
5: |
apiVersion: v1
imagePullSecrets:
- name: github
kind: ServiceAccount
metadata:
name: RELEASE-NAME-example-content
namespace: NAMESPACE
5: |
6: |
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -137,6 +161,7 @@ matches the snapshot (internalUrl):
spec:
remoteConfiguration:
contentType: json
internalUrl: http://openmfp-example-content.openmfp-system.svc.cluster.local:8080/wc/assets/config.json
url: http://localhost:8000/ui/example-content/wc/assets/config.json
3: |
apiVersion: apps/v1
Expand Down Expand Up @@ -206,14 +231,36 @@ matches the snapshot (internalUrl):
- emptyDir: {}
name: run-volume
4: |
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: RELEASE-NAME-example-content
namespace: NAMESPACE
spec:
gateways:
- NAMESPACE/gateway
hosts:
- '*'
http:
- match:
- uri:
prefix: /ui/example-content
rewrite:
uri: /
route:
- destination:
host: RELEASE-NAME-example-content.NAMESPACE.svc.cluster.local
port:
number: 8080
5: |
apiVersion: v1
imagePullSecrets:
- name: github
kind: ServiceAccount
metadata:
name: RELEASE-NAME-example-content
namespace: NAMESPACE
5: |
6: |
apiVersion: v1
kind: Service
metadata:
Expand Down
17 changes: 12 additions & 5 deletions charts/example-content/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,33 @@ image:
name: ghcr.io/openmfp/example-content

istio:
enabled: true
virtualService:
hosts:
- your-host.com
- "*"
# matchers:
# - match:
# - uri:
# prefix: /ui/
matchers:
- match:
- uri:
exact: /ui/example-content
- uri:
prefix: /ui/example-content/
- uri:
prefix: /ui/example-content
rewrite:
uri: /

contentConfigurations:
# -- This content configuration enables a basic homepage in the portal
ui:
enabled: true
url: http://localhost:8000/ui/example-content/ui/assets/config.json
internalUrl: http://openmfp-example-content.openmfp-system.svc.cluster.local:8080/ui/assets/config.json
# Set internal url especially for local a setup where the url is not reachable from within the cluster
# internalUrl: null
wc:
enabled: true
url: http://localhost:8000/ui/example-content/wc/assets/config.json
internalUrl: http://openmfp-example-content.openmfp-system.svc.cluster.local:8080/wc/assets/config.json
# Set internal url especially for local a setup where the url is not reachable from within the cluster
# internalUrl: null

Expand Down

0 comments on commit 837096d

Please sign in to comment.