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

helm: support PriorityClassName on gateway-proxy #9902

Merged
merged 7 commits into from
Aug 15, 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
29 changes: 29 additions & 0 deletions changelog/v1.18.0-beta16/helm-priority-class-name.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
changelog:
- type: HELM
issueLink: https://github.com/solo-io/gloo/issues/8677
resolvesIssue: false
description: >-
Ensure that gateway-proxy deployments respect the `gatewayProxy.NAME.kind.deployment.priorityClassName` field.
This API allows you to set the PriorityClassName for gateway-proxy Pods.
This is already supported on all other Gloo deployments.
- type: FIX
issueLink: https://github.com/solo-io/gloo/issues/9010
resolvesIssue: false
description: >-
Support defining the PriorityClassName on a GatewayProxy deployment. This allows users to
attach pods to PriorityClasses (https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/)
- type: NON_USER_FACING
issueLink: https://github.com/solo-io/gloo/issues/9823
resolvesIssue: false
description: >-
This is a duplicate issue that tracks the single enhancement that we are adding here.
- type: NON_USER_FACING
issueLink: https://github.com/solo-io/gloo/issues/9731
resolvesIssue: false
description: >-
This is a duplicate issue that tracks the single enhancement that we are adding here.





6 changes: 6 additions & 0 deletions install/helm/gloo/generate/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,12 @@ type DaemonSetSpec struct {
HostNetwork *bool `json:"hostNetwork,omitempty"`
}

// GatewayProxyPodTemplate contains the Helm API available to configure the PodTemplate on the gateway-proxy Deployment
//
// Note to Developers: The Helm API for the PodTemplate is split between the values defined in this struct, and the values
// in the PodSpec, which is available for a GatewayProxy under `gatewayProxy.kind.Deployment`.
// The side effect of this, is that there may be Helm values which may live on both structs, but only one is used by our templates.
// Always refer back to the Helm templates to see which is used.
type GatewayProxyPodTemplate struct {
HttpPort *int `json:"httpPort,omitempty" desc:"HTTP port for the gateway service target port."`
HttpsPort *int `json:"httpsPort,omitempty" desc:"HTTPS port for the gateway service target port."`
Expand Down
5 changes: 5 additions & 0 deletions install/helm/gloo/templates/7-gateway-proxy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ spec:
{{- if $spec.podTemplate.nodeName }}
nodeName: {{$spec.podTemplate.nodeName}}
{{- end }}
{{- if $spec.kind.deployment}}
{{- if $spec.kind.deployment.priorityClassName }}
priorityClassName: {{ $spec.kind.deployment.priorityClassName }}
{{- end }}
{{- end }}
{{- if $spec.podTemplate.nodeSelector }}
nodeSelector:
{{- range $key, $value := $spec.podTemplate.nodeSelector }}
Expand Down
11 changes: 11 additions & 0 deletions install/test/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3297,6 +3297,17 @@ spec:
testManifest.ExpectDeploymentAppsV1(gatewayProxyDeployment)
})

It("enables priorityClassName", func() {
prepareMakefile(namespace, glootestutils.HelmValues{
ValuesArgs: []string{
"gatewayProxies.gatewayProxy.kind.deployment.priorityClassName=example-priority",
},
})

gatewayProxyDeployment.Spec.Template.Spec.PriorityClassName = "example-priority"
testManifest.ExpectDeploymentAppsV1(gatewayProxyDeployment)
})

It("supports custom readiness and liveness probe", func() {
prepareMakefile(namespace, glootestutils.HelmValues{
ValuesArgs: []string{
Expand Down
Loading