You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are attempting to use GCE (Google Cloud Ingress controller on GKE) with the pingDevops helm chart. With GCE Ingress you need to add annotations to the service block to add in backend configurations for the GCE ingress controller. The issue is the way the yaml schema for the services and/or the way the template for the workload was written. It treats the annotations map as another service definition and thus the workload fails to deploy.
Here is an example.
Deploying the helm chart without annotations deployed on GKE works as expected.
service: ping-devops-pingfederate-admin.yaml
apiVersion: v1
kind: Service
metadata:
annotations:
meta.helm.sh/release-name: ping-devops
meta.helm.sh/release-namespace: ping-devops-review-9b2a503e
The workload (in this case a statefulset) fails as it is trying to add the annotation block as another port definition. Here is the output of the port section of the rendered yaml file for the statefulset ping-devops-pingfederate-admin.yaml
One fix (and probably the best approach) would be to modify the v.services schema like described in this issue: #159
however as a quick fix we forked this repo and added a conditional to the ports block that checks if the @serviceName != "annotations" on the charts/ping-devops/templates/pinglib/_workload.tpl file on line 144 {{- if ne $serviceName "annotations" }} .
ports:
{{- range $serviceName, $val := . }}
{{- if ne $serviceName "annotations" }}
{{- if kindIs "map" $val }}
- containerPort: {{ $val.containerPort }}
name: {{ $serviceName }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
After making this change, the statefulset deploys successfully and the GCE ingress works as expected. Note: The same problem will heppen for adding any of these maps to the services block:
We are attempting to use GCE (Google Cloud Ingress controller on GKE) with the pingDevops helm chart. With GCE Ingress you need to add
annotations
to theservice
block to add in backend configurations for the GCE ingress controller. The issue is the way the yaml schema for the services and/or the way the template for the workload was written. It treats theannotations
map as another service definition and thus the workload fails to deploy.Here is an example.
Deploying the helm chart without annotations deployed on GKE works as expected.
service: ping-devops-pingfederate-admin.yaml
statefulset: ping-devops-pingfederate-admin.yaml
ports block
Now lets add
annotations
to theservices
by adding the required configurations to the values.yaml file.values.yaml with annotations added to the service on the pingfederate-admin block as documented.
The
workload
(in this case a statefulset) fails as it is trying to add theannotation
block as another port definition. Here is the output of the port section of the rendered yaml file for thestatefulset ping-devops-pingfederate-admin.yaml
As you can see it added
name: annotations
to the map of ports.The good news is it did successfully add the annotation to the service.
One fix (and probably the best approach) would be to modify the v.services schema like described in this issue: #159
however as a quick fix we forked this repo and added a conditional to the ports block that checks if the @serviceName != "annotations" on the
charts/ping-devops/templates/pinglib/_workload.tpl
file on line 144{{- if ne $serviceName "annotations" }}
.After making this change, the statefulset deploys successfully and the GCE ingress works as expected. Note: The same problem will heppen for adding any of these maps to the services block:
as the template is just looking for
if kindIs "map"
.See service Documentation here: https://github.com/pingidentity/helm-charts/blob/master/charts/ping-devops/values.yaml#L401-L421
The text was updated successfully, but these errors were encountered: