Skip to content

Commit

Permalink
remove KH_K8S_CLUSTER_NAME_ENV_PTR var (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
jt-dd committed Sep 17, 2024
1 parent 821bea3 commit a4269df
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/config/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import (
)

const (
clusterNameEnvVarPtr = "KH_K8S_CLUSTER_NAME_ENV_PTR"
clusterNameEnvVar = "KH_K8S_CLUSTER_NAME"
clusterNameEnvVar = "KH_K8S_CLUSTER_NAME"
)

// ClusterInfo encapsulates the target cluster information for the current run.
Expand All @@ -22,11 +21,7 @@ type ClusterInfo struct {
func NewClusterInfo(_ context.Context) (*ClusterInfo, error) {
// Testing if running from pod
// Using an environment variable to get the cluster name as it is not provided in the pod configuration
clusterNamePtr := os.Getenv(clusterNameEnvVarPtr)
clusterName := os.Getenv(clusterNameEnvVar)
if clusterNamePtr != "" {
clusterName = os.Getenv(clusterNamePtr)
}
if clusterName != "" {
log.I.Warnf("Using cluster name from environment variable [%s]: %s", clusterNameEnvVar, clusterName)

Expand Down

0 comments on commit a4269df

Please sign in to comment.