Skip to content

Commit

Permalink
Merge pull request #58 from port-labs/PORT-5790-port-agent-chart
Browse files Browse the repository at this point in the history
added validation to port agent chart
  • Loading branch information
MatanHeledPort authored Dec 26, 2023
2 parents 7543af8 + 5f1c018 commit d9d3333
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/validate-ocean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Helm Chart Validation
on:
pull_request:
paths:
- charts/port-ocean/
- charts/port-ocean/**

jobs:
validate:
Expand All @@ -28,4 +28,4 @@ jobs:

- name: Validate Helm Chart
run: |
helm template --set port.clientId="test" --set port.clientSecret="test" . | kubectl apply --dry-run=client -f -
helm template --set secret.secrets.portClientId=test --set secret.secrets.portClientSecret=test --set configMap.config=test . | kubectl apply --dry-run=client -f -
34 changes: 34 additions & 0 deletions .github/workflows/validate-port-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Helm Chart Validation

on:
pull_request:
paths:
- charts/port-agent/**

jobs:
validate:
defaults:
run:
working-directory: charts/port-agent/
runs-on: ubuntu-latest
name: Validate Helm Chart

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Helm
uses: azure/setup-helm@v3

- name: Create k8s Kind Cluster
uses: helm/[email protected]

- name: Lint Helm Chart
run: helm lint .

- name: Validate Helm Chart
run: |
helm template --set env.normal.PORT_ORG_ID=test_org \
--set env.normal.KAFKA_CONSUMER_GROUP_ID=test_group_id \
--set env.secret.PORT_CLIENT_ID=test \
--set env.secret.PORT_CLIENT_SECRET=test . | kubectl apply --dry-run=client -f -
8 changes: 4 additions & 4 deletions charts/port-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ metadata:
spec:
strategy:
type: {{ .Values.rolloutStrategy }}
securityContext:
{{- if .Values.podSecurityContext }}
{{- toYaml .Values.podSecurityContext | nindent 4 }}
{{- end }}
replicas: 1
selector:
matchLabels:
Expand All @@ -28,6 +24,10 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- if .Values.podSecurityContext }}
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down

0 comments on commit d9d3333

Please sign in to comment.