Skip to content
Merged
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
13 changes: 13 additions & 0 deletions pkg/operator/csidriveroperator/hypershift_deployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,19 @@ func (c *HyperShiftDeploymentController) Sync(ctx context.Context, syncCtx facto
}
}

// For self-managed Azure (not ARO HCP), pass HYPERSHIFT_IMAGE to enable token-minter sidecars
if os.Getenv("ARO_HCP_SECRET_PROVIDER_CLASS_FOR_DISK") == "" && requiredCopy.Name == "azure-disk-csi-driver-operator" {
if hyperShiftImage := os.Getenv("HYPERSHIFT_IMAGE"); hyperShiftImage != "" {
envVars = append(envVars, corev1.EnvVar{Name: "HYPERSHIFT_IMAGE", Value: hyperShiftImage})
}
}

if os.Getenv("ARO_HCP_SECRET_PROVIDER_CLASS_FOR_FILE") == "" && requiredCopy.Name == "azure-file-csi-driver-operator" {
if hyperShiftImage := os.Getenv("HYPERSHIFT_IMAGE"); hyperShiftImage != "" {
envVars = append(envVars, corev1.EnvVar{Name: "HYPERSHIFT_IMAGE", Value: hyperShiftImage})
}
}

if len(envVars) > 0 {
requiredCopy.Spec.Template.Spec.Containers[0].Env = append(requiredCopy.Spec.Template.Spec.Containers[0].Env, envVars...)
}
Expand Down