Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(example-content): bump chart version to 0.113.3 and update snapshot tests #352

Merged
merged 1 commit into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/example-content/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "0.148.0"
description: Helm Chart for the openmfp Portal
name: example-content
version: 0.113.2
version: 0.113.3
dependencies:
- name: common
version: 0.2.7
Expand Down
111 changes: 111 additions & 0 deletions charts/example-content/tests/__snapshot__/snapshot_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,114 @@ matches the snapshot:
selector:
app: RELEASE-NAME-example-content
type: ClusterIP
matches the snapshot (internalUrl):
1: |
apiVersion: core.openmfp.io/v1alpha1
kind: ContentConfiguration
metadata:
name: RELEASE-NAME-example-content-ui
namespace: NAMESPACE
spec:
remoteConfiguration:
contentType: json
internalUrl: http://example-content:8000/ui/assets/config.json
url: http://localhost:8000/ui/example-content/ui/assets/config.json
2: |
apiVersion: core.openmfp.io/v1alpha1
kind: ContentConfiguration
metadata:
name: RELEASE-NAME-example-content-wc
namespace: NAMESPACE
spec:
remoteConfiguration:
contentType: json
url: http://localhost:8000/ui/example-content/wc/assets/config.json
3: |
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: RELEASE-NAME-example-content
name: RELEASE-NAME-example-content
spec:
revisionHistoryLimit: 3
selector:
matchLabels:
app: RELEASE-NAME-example-content
strategy:
rollingUpdate:
maxSurge: 5
maxUnavailable: 0
template:
metadata:
labels:
app: RELEASE-NAME-example-content
spec:
containers:
- env:
- name: PORT
value: "8080"
image: ghcr.io/openmfp/example-content:1.0.0
imagePullPolicy: Always
name: RELEASE-NAME-example-content
ports:
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 8080
name: metrics
protocol: TCP
- containerPort: 8081
name: health-port
protocol: TCP
resources:
limits:
cpu: 100m
memory: 512Mi
requests:
cpu: 40m
memory: 50Mi
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /var/cache/nginx
name: tmp-volume
readOnly: false
- mountPath: /var/run
name: run-volume
readOnly: false
securityContext:
fsGroup: 2000
runAsGroup: 3000
runAsUser: 1000
serviceAccountName: RELEASE-NAME-example-content
volumes:
- emptyDir: {}
name: tmp-volume
- emptyDir: {}
name: run-volume
4: |
apiVersion: v1
imagePullSecrets:
- name: github
kind: ServiceAccount
metadata:
name: RELEASE-NAME-example-content
namespace: NAMESPACE
5: |
apiVersion: v1
kind: Service
metadata:
name: RELEASE-NAME-example-content
namespace: NAMESPACE
spec:
ports:
- name: http
port: 8080
protocol: TCP
selector:
app: RELEASE-NAME-example-content
type: ClusterIP
7 changes: 7 additions & 0 deletions charts/example-content/tests/snapshot_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,12 @@ tests:
- it: matches the snapshot
values:
- ../test-values.yaml
asserts:
- matchSnapshot: {}
- it: matches the snapshot (internalUrl)
values:
- ../test-values.yaml
set:
contentConfigurations.ui.internalUrl: http://example-content:8000/ui/assets/config.json
asserts:
- matchSnapshot: {}