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

refact(gateway-operator): Fix inconsistent image settings #36

Merged
merged 2 commits into from
Oct 2, 2024
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
11 changes: 6 additions & 5 deletions .github/workflows/publish-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ jobs:
cd stunner-helm/helm
if ${{ env.TAG == 'dev' }}; then
sed -ri 's/^(\s*)(name\s*:\s*.*\s*$)/\1name: stunner-gateway-operator-dev/' stunner-gateway-operator/Chart.yaml
sed -ri 's/^(\s*)( pullPolicy\s*:\s*.*\s*$)/\1 pullPolicy: Always/' stunner-gateway-operator/values.yaml
sed -ri 's|^(\s*)( image: docker.io/l7mp/stunnerd:\s*.*\s*$)| image: docker.io/l7mp/stunnerd:dev|' stunner-gateway-operator/values.yaml
sed -ri 's|^(\s*)( tag\s*:\s*.*\s*$)| tag: dev|' stunner-gateway-operator/values.yaml
sed -i '/stunnerGatewayOperator:/,/pullPolicy:/ s/\(pullPolicy:\s*\).*/\1Always/' stunner-gateway-operator/values.yaml
sed -i '/dataplane:/,/pullPolicy:/ s/\(pullPolicy:\s*\).*/\1Always/' stunner-gateway-operator/values.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This was missing from bdaf732

sed -i '/dataplane:/,/tag:/ s/\(tag:\s*\).*/\1'"dev"'/' stunner-gateway-operator/values.yaml
sed -i '/authService:/,/pullPolicy:/ s/\(pullPolicy:\s*\).*/\1Always/' stunner-gateway-operator/values.yaml
sed -i '/authService:/,/tag:/ s/\(tag:\s*\).*/\1'"dev"'/' stunner-gateway-operator/values.yaml
else
sed -ri 's/^(\s*)(version\s*:\s*.*\s*$)/\1version: ${{ env.TAG }}/' stunner-gateway-operator/Chart.yaml
sed -ri 's|^(\s*)( image: docker.io/l7mp/stunnerd:\s*.*\s*$)| image: docker.io/l7mp/stunnerd:${{ env.TAG }}|' stunner-gateway-operator/values.yaml
fi
sed -i '/stunnerGatewayOperator:/,/tag:/ s/\(tag:\s*\).*/\1'"${{ env.TAG }}"'/' stunner-gateway-operator/values.yaml
sed -ri 's/^(\s*)(appVersion\s*:\s*.*\s*$)/\1appVersion: ${{ env.TAG }}/' stunner-gateway-operator/Chart.yaml
sed -ri 's/^(\s*)( tag\s*:\s*.*\s*$)/\1 tag: ${{ env.TAG }}/' stunner-gateway-operator/values.yaml

- name: Set up Helm
uses: azure/setup-helm@v4
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ jobs:
cd stunner-helm/helm
if ${{ env.TAG == 'dev' }}; then
sed -ri 's/^(\s*)(name\s*:\s*.*\s*$)/\1name: stunner-gateway-operator-dev/' stunner-gateway-operator/Chart.yaml
sed -ri 's/^(\s*)( pullPolicy\s*:\s*.*\s*$)/\1 pullPolicy: Always/' stunner-gateway-operator/values.yaml
sed -ri 's|^(\s*)( image: docker.io/l7mp/stunnerd:\s*.*\s*$)| image: docker.io/l7mp/stunnerd:dev|' stunner-gateway-operator/values.yaml
sed -ri 's|^(\s*)( tag\s*:\s*.*\s*$)| tag: dev|' stunner-gateway-operator/values.yaml
sed -i '/stunnerGatewayOperator:/,/pullPolicy:/ s/\(pullPolicy:\s*\).*/\1Always/' stunner-gateway-operator/values.yaml
sed -i '/dataplane:/,/pullPolicy:/ s/\(pullPolicy:\s*\).*/\1Always/' stunner-gateway-operator/values.yaml
sed -i '/dataplane:/,/tag:/ s/\(tag:\s*\).*/\1'"dev"'/' stunner-gateway-operator/values.yaml
sed -i '/authService:/,/pullPolicy:/ s/\(pullPolicy:\s*\).*/\1Always/' stunner-gateway-operator/values.yaml
sed -i '/authService:/,/tag:/ s/\(tag:\s*\).*/\1'"dev"'/' stunner-gateway-operator/values.yaml
else
sed -ri 's/^(\s*)(version\s*:\s*.*\s*$)/\1version: ${{ env.TAG }}/' stunner-gateway-operator/Chart.yaml
sed -ri 's|^(\s*)( image: docker.io/l7mp/stunnerd:\s*.*\s*$)| image: docker.io/l7mp/stunnerd:${{ env.TAG }}|' stunner-gateway-operator/values.yaml
fi
sed -i '/stunnerGatewayOperator:/,/tag:/ s/\(tag:\s*\).*/\1'"${{ env.TAG }}"'/' stunner-gateway-operator/values.yaml
sed -ri 's/^(\s*)(appVersion\s*:\s*.*\s*$)/\1appVersion: ${{ env.TAG }}/' stunner-gateway-operator/Chart.yaml
sed -ri 's/^(\s*)( tag\s*:\s*.*\s*$)/\1 tag: ${{ env.TAG }}/' stunner-gateway-operator/values.yaml

- name: Set up Helm
uses: azure/setup-helm@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ metadata:
name: default
spec:
replicas: {{ .replicas }}
image: {{ .image }}
imagePullPolicy: {{ .imagePullPolicy }}
image: "{{ .image.name }}:{{ .image.tag }}"
imagePullPolicy: {{ .image.pullPolicy }}
command:
{{- range .command }}
- {{ . }}
Expand Down Expand Up @@ -39,4 +39,4 @@ spec:
tolerations: {{- toYaml . | nindent 2 }}
{{- end }}
{{- end -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ spec:
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: {{ .Values.stunnerGatewayOperator.deployment.container.kubeRbacProxy.image.name }}
image: "{{ .Values.stunnerGatewayOperator.deployment.container.kubeRbacProxy.image.name }}:{{ .Values.stunnerGatewayOperator.deployment.container.kubeRbacProxy.image.tag }}"
imagePullPolicy: {{ .Values.stunnerGatewayOperator.deployment.container.kubeRbacProxy.image.pullPolicy }}
name: kube-rbac-proxy
ports:
- containerPort: 8443
Expand Down Expand Up @@ -397,4 +398,4 @@ spec:
{{- with .Values.stunnerGatewayOperator.deployment.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
12 changes: 8 additions & 4 deletions helm/stunner-gateway-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,20 @@ stunnerGatewayOperator:
- --zap-log-level=info
kubeRbacProxy:
image:
name: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0
name: gcr.io/kubebuilder/kube-rbac-proxy
pullPolicy: IfNotPresent
tag: v0.16.0
dataplane:
# Can be 'legacy' or 'managed'
# default is managed
mode: managed
spec:
replicas: 1
# for dev version set it to docker.io/l7mp/stunnerd:dev
image: docker.io/l7mp/stunnerd:0.21.0
imagePullPolicy: IfNotPresent
image:
name: docker.io/l7mp/stunnerd
pullPolicy: IfNotPresent
tag: 0.21.0
command:
- stunnerd
args:
Expand Down Expand Up @@ -83,4 +87,4 @@ stunnerAuthService:
tag: 0.21.0
args:
- --port=8088
- -v
- -v