Skip to content

Commit

Permalink
Merge branch 'master' into hotfix-svcexport
Browse files Browse the repository at this point in the history
Signed-off-by: Mridul Gain <[email protected]>
  • Loading branch information
mridulgain committed May 23, 2024
2 parents 9365706 + b3c625e commit e3b14cf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
6 changes: 5 additions & 1 deletion pkg/hub/controllers/cluster/deregister.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ func constructConfigMap(data string) *corev1.ConfigMap {
}

func constructJobForClusterDeregister() *batchv1.Job {
workerInstallerImage := os.Getenv("WORKER_INSTALLER_IMAGE")
if workerInstallerImage == "" {
workerInstallerImage = WORKER_INSTALLER_DEFAULT_IMAGE
}
backOffLimit := int32(0)
ttlSecondsAfterFinished := int32(600)
job := &batchv1.Job{
Expand All @@ -304,7 +308,7 @@ func constructJobForClusterDeregister() *batchv1.Job {
ServiceAccountName: serviceAccountName,
Containers: []corev1.Container{{
Name: cleanupContainer,
Image: "aveshasystems/worker-installer:1.1.8",
Image: workerInstallerImage,
Command: []string{
"/bin/bash",
"/tmp/kubeslice-cleanup.sh",
Expand Down
17 changes: 9 additions & 8 deletions pkg/hub/controllers/cluster/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ import (
)

var (
ControlPlaneNamespace = "kubeslice-system"
HubSecretSuffix = "-kubernetes-dashboard"
KubeSliceDashboardSA = "kubeslice-kubernetes-dashboard"
ProjectNamespace = os.Getenv("HUB_PROJECT_NAMESPACE")
HubEndpoint = os.Getenv("HUB_HOST_ENDPOINT")
HubTokenFile = utils.GetEnvOrDefault("HUB_TOKEN_FILE", "/var/run/secrets/kubernetes.io/hub-serviceaccount/token")
HubCAFile = utils.GetEnvOrDefault("HUB_CA_FILE", "/var/run/secrets/kubernetes.io/hub-serviceaccount/ca.crt")
ClusterName = os.Getenv("CLUSTER_NAME")
ControlPlaneNamespace = "kubeslice-system"
HubSecretSuffix = "-kubernetes-dashboard"
KubeSliceDashboardSA = "kubeslice-kubernetes-dashboard"
ProjectNamespace = os.Getenv("HUB_PROJECT_NAMESPACE")
HubEndpoint = os.Getenv("HUB_HOST_ENDPOINT")
HubTokenFile = utils.GetEnvOrDefault("HUB_TOKEN_FILE", "/var/run/secrets/kubernetes.io/hub-serviceaccount/token")
HubCAFile = utils.GetEnvOrDefault("HUB_CA_FILE", "/var/run/secrets/kubernetes.io/hub-serviceaccount/ca.crt")
ClusterName = os.Getenv("CLUSTER_NAME")
WORKER_INSTALLER_DEFAULT_IMAGE = "aveshasystems/worker-installer:1.1.8"
)

0 comments on commit e3b14cf

Please sign in to comment.