Unverified Commit d79a35fd authored by Michelle Nguyen's avatar Michelle Nguyen Committed by Copybara
Browse files

PP-2736 Add disableAutoUpdate to helm chart

Summary: this diff adds disableAutoUpdate to the helm chart. cloudconn is responsible for reading the configmap value and passing it to cloudconn in its heartbeats.

Test Plan: built rc

Reviewers: vihang, zasgar, nserrino

Reviewed By: vihang

JIRA Issues: PP-2736

Differential Revision: https://phab.corp.pixielabs.ai/D8605

GitOrigin-RevId: 7a554062b89e8d89f467f3a815f7222201ba95ca
parent 398b9017
No related merge requests found
Showing with 13 additions and 0 deletions
+13 -0
......@@ -52,6 +52,9 @@ spec:
- configMapRef:
name: pl-cloud-connector-bootstrap-config
optional: true
- configMapRef:
name: pl-cluster-config
optional: true
ports:
- containerPort: 50800
volumeMounts:
......
......@@ -57,6 +57,7 @@ type VizierTmplValues struct {
BootstrapVersion string
PEMMemoryLimit string
Namespace string
DisableAutoUpdate bool
}
// VizierTmplValuesToArgs converts the vizier template values to args which can be used to fill out a template.
......@@ -72,6 +73,7 @@ func VizierTmplValuesToArgs(tmplValues *VizierTmplValues) *yamls.YAMLTmplArgumen
"useEtcdOperator": tmplValues.UseEtcdOperator,
"bootstrapVersion": tmplValues.BootstrapVersion,
"pemMemoryLimit": tmplValues.PEMMemoryLimit,
"disableAutoUpdate": tmplValues.DisableAutoUpdate,
},
Release: &map[string]interface{}{
"Namespace": tmplValues.Namespace,
......@@ -239,6 +241,12 @@ func GenerateSecretsYAML(clientset *kubernetes.Clientset, versionStr string, boo
Placeholder: "__PX_MEMORY_LIMIT__",
TemplateValue: `"{{ .Values.pemMemoryLimit }}"`,
},
{
TemplateMatcher: yamls.GenerateResourceNameMatcherFn("pl-cluster-config"),
Patch: `{"data": { "PL_DISABLE_AUTO_UPDATE": "__PL_DISABLE_AUTO_UPDATE__"} }`,
Placeholder: "__PL_DISABLE_AUTO_UPDATE__",
TemplateValue: `{{ if .Values.disableAutoUpdate }}"{{ .Values.disableAutoUpdate }}"{{ else }}"false"{{ end }}`,
},
{
TemplateMatcher: yamls.GenerateResourceNameMatcherFn("pl-cloud-config"),
Patch: `{"data": { "PL_CLOUD_ADDR": "__PL_CLOUD_ADDR__"} }`,
......
......@@ -1031,6 +1031,7 @@ func (s *Bridge) generateHeartbeats(done <-chan bool) chan *cvmsgspb.VizierHeart
Status: s.currentStatus(),
BootstrapMode: viper.GetBool("bootstrap_mode"),
BootstrapVersion: viper.GetString("bootstrap_version"),
DisableAutoUpdate: viper.GetBool("disable_auto_update"),
}
select {
case <-s.quitCh:
......
......@@ -52,6 +52,7 @@ func init() {
pflag.String("qb_port", "50300", "The querybroker service port")
pflag.String("cluster_name", "", "The name of the user's K8s cluster")
pflag.String("deploy_key", "", "The deploy key for the cluster")
pflag.Bool("disable_auto_update", false, "Whether auto-update should be disabled")
}
func newVzServiceClient() (vizierpb.VizierServiceClient, error) {
dialOpts, err := services.GetGRPCClientDialOpts()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment