Skip to content

Commit

Permalink
chore: upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nexus49 committed Nov 21, 2024
1 parent 34dfc63 commit d8a45ee
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 97 deletions.
6 changes: 3 additions & 3 deletions charts/portal/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.1.3
digest: sha256:458eeb38012b33fb226ca0cb45ecbcdd21e2a28025619bc0b01dd71a079c9882
generated: "2024-10-11T11:24:57.022871+02:00"
version: 0.1.4
digest: sha256:05e31c3eb487f942d4ac07ce0dfe4e0620779b589ef481cdd6534c73a7f0ca27
generated: "2024-11-20T11:36:34.0773803+02:00"
4 changes: 2 additions & 2 deletions charts/portal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
appVersion: "0.164.0"
description: Helm Chart for the openmfp Portal
name: portal
version: 0.69.87
version: 0.69.88
dependencies:
- name: common
repository: file://../common
version: 0.1.3
version: 0.1.4
Binary file added charts/portal/charts/common-0.1.4.tgz
Binary file not shown.
12 changes: 6 additions & 6 deletions charts/portal/templates/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "entity.name" . }}
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "entity.name" . }}
app: {{ include "common.entity.name" . }}
spec:
strategy:
rollingUpdate:
Expand All @@ -13,19 +13,19 @@ spec:
revisionHistoryLimit: 3
selector:
matchLabels:
app: {{ include "entity.name" . }}
app: {{ include "common.entity.name" . }}
template:
metadata:
labels:
app: {{ include "entity.name" . }}
app: {{ include "common.entity.name" . }}
spec:
serviceAccountName: {{ include "entity.name" . }}
serviceAccountName: {{ include "common.entity.name" . }}
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
containers:
- name: {{ include "entity.name" . }}
- name: {{ include "common.entity.name" . }}
image: {{ .Values.image.name }}:{{ .Chart.AppVersion }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
Expand Down
6 changes: 3 additions & 3 deletions charts/portal/templates/istio-destination-rule.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{- if .Values.istio.enabled -}}
{{- if eq (include "common.istioEnabled" .) "true" -}}
apiVersion: "networking.istio.io/v1alpha3"
kind: "DestinationRule"
metadata:
name: {{ include "entity.name" . }}
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
spec:
host: {{ include "entity.name" . }}.{{ .Release.Namespace }}.svc.cluster.local
host: {{ include "common.entity.name" . }}.{{ .Release.Namespace }}.svc.cluster.local
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
Expand Down
6 changes: 3 additions & 3 deletions charts/portal/templates/istio-peerauthentication.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{- if .Values.istio.enabled -}}
{{- if eq (include "common.istioEnabled" .) "true" -}}
apiVersion: "security.istio.io/v1beta1"
kind: "PeerAuthentication"
metadata:
name: {{ include "entity.name" . }}
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app: {{ include "entity.name" . }}
app: {{ include "common.entity.name" . }}
mtls:
mode: STRICT
{{- end -}}
10 changes: 5 additions & 5 deletions charts/portal/templates/istio-virtual-service.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{{- if .Values.istio.enabled -}}
{{- if eq (include "common.istioEnabled" .) "true" -}}
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: {{ include "entity.name" . }}
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
spec:
gateways:
- {{ .Release.Namespace }}/gateway
hosts:
{{- if (.Values.istio.virtualService).hosts }}
{{ .Values.istio.virtualService.hosts | toYaml | nindent 2}}
{{- if (.Values.virtualService).hosts }}
{{ .Values.virtualService.hosts | toYaml | nindent 2}}
{{- else }}
{{ range $domainName := .Values.baseDomains }}
- {{ $domainName }}
Expand All @@ -31,7 +31,7 @@ spec:
- DELETE
route:
- destination:
host: {{ include "entity.name" . }}.{{ .Release.Namespace }}.svc.cluster.local
host: {{ include "common.entity.name" . }}.{{ .Release.Namespace }}.svc.cluster.local
port:
number: 8080
{{- end -}}
2 changes: 1 addition & 1 deletion charts/portal/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
name: read-contentconfigurations-global
subjects:
- kind: ServiceAccount
name: {{ include "entity.name" . }}
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
Expand Down
2 changes: 1 addition & 1 deletion charts/portal/templates/sa.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "entity.name" . }}
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
imagePullSecrets:
- name: {{ .Values.image.pullSecret }}
4 changes: 2 additions & 2 deletions charts/portal/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
kind: Service
apiVersion: v1
metadata:
name: {{ include "entity.name" . }}
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
spec:
selector:
app: {{ include "entity.name" . }}
app: {{ include "common.entity.name" . }}
ports:
- name: http
protocol: TCP
Expand Down
6 changes: 3 additions & 3 deletions charts/portal/templates/sidecar.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{- if .Values.istio.enabled -}}
{{- if eq (include "common.istioEnabled" .) "true" -}}
apiVersion: networking.istio.io/v1beta1
kind: Sidecar
metadata:
name: {{ include "entity.name" . }}
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
spec:
workloadSelector:
labels:
app: {{ include "entity.name" . }}
app: {{ include "common.entity.name" . }}
outboundTrafficPolicy:
mode: ALLOW_ANY
{{- end -}}
71 changes: 3 additions & 68 deletions charts/portal/tests/__snapshot__/istio_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -92,59 +92,6 @@ matches the snapshot:
deletionPolicy: Retain
name: portal-client-secret-portal
3: |
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: RELEASE-NAME-portal
namespace: NAMESPACE
spec:
host: RELEASE-NAME-portal.NAMESPACE.svc.cluster.local
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
4: |
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: RELEASE-NAME-portal
namespace: NAMESPACE
spec:
mtls:
mode: STRICT
selector:
matchLabels:
app: RELEASE-NAME-portal
5: |
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: RELEASE-NAME-portal
namespace: NAMESPACE
spec:
gateways:
- NAMESPACE/gateway
hosts:
- portal.example.com
- portal.portal.example.com
- portal2.example.com
- portal.portal2.example.com
http:
- corsPolicy:
allowHeaders:
- Authorization
- Content-Type
- '*'
allowMethods:
- GET
- POST
- PUT
- DELETE
route:
- destination:
host: RELEASE-NAME-portal.NAMESPACE.svc.cluster.local
port:
number: 8080
6: |
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand All @@ -158,7 +105,7 @@ matches the snapshot:
- get
- watch
- list
7: |
4: |
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -171,15 +118,15 @@ matches the snapshot:
- kind: ServiceAccount
name: RELEASE-NAME-portal
namespace: NAMESPACE
8: |
5: |
apiVersion: v1
imagePullSecrets:
- name: github
kind: ServiceAccount
metadata:
name: RELEASE-NAME-portal
namespace: NAMESPACE
9: |
6: |
apiVersion: v1
kind: Service
metadata:
Expand All @@ -193,18 +140,6 @@ matches the snapshot:
selector:
app: RELEASE-NAME-portal
type: ClusterIP
10: |
apiVersion: networking.istio.io/v1beta1
kind: Sidecar
metadata:
name: RELEASE-NAME-portal
namespace: NAMESPACE
spec:
outboundTrafficPolicy:
mode: ALLOW_ANY
workloadSelector:
labels:
app: RELEASE-NAME-portal
matches the snapshot with istio disabled:
1: |
apiVersion: apps/v1
Expand Down
4 changes: 4 additions & 0 deletions charts/portal/tests/istio-virtual_service_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ values:
- ../test-values.yaml
tests:
- it: virtual service match the snapshot
set:
global:
istio:
enabled: true
asserts:
- matchSnapshot: {}
3 changes: 3 additions & 0 deletions charts/portal/tests/istio_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ chart:
appVersion: 1.0.0
tests:
- it: matches the snapshot
set:
istio:
enabled: false
values:
- ../test-values.yaml
asserts:
Expand Down

0 comments on commit d8a45ee

Please sign in to comment.