square-energy-17741
10/12/2021, 3:36 AMhelm.v3.Release
not honoring namespace
with certain charts. I have tried with helm
CLI and helm.v3.Chart
and they both work correctly. This is happening with only certain Charts -
• jx-git-operator from https://jenkins-x-charts.github.io/repo
• cluster-autoscaler from https://kubernetes.github.io/autoscalerworried-city-86458
10/12/2021, 5:00 AMkube-system
as the namespace// cluster autoscaler; <https://github.com/kubernetes/autoscaler>
Logger.LogDebug("Installing cluster autoscaler");
var clusterAutoscalerRole = new RoleX($"{k8sPrefix}-cluster-autoscaler",
new RoleXArgs
{
AssumeRolePolicy = IamHelpers.AssumeRoleForServiceAccount(oidcArn, oidcUrl, "kube-system", "cluster-autoscaler", awsProvider),
InlinePolicies = { ["policy"] = ReadResource("ClusterAutoscalerPolicy.json") }
},
new ComponentResourceOptions { Provider = awsProvider });
var clusterAutoscalerValues = Output.Tuple(clusterName, clusterAutoscalerRole.Arn).Apply(((string ClusterName, string RoleArn) tuple) =>
new Dictionary<string, object>
{
["nameOverride"] = "cluster-autoscaler",
["kubeTargetVersionOverride"] = K8sConfig.Version,
["image"] = new
{
tag = $"v{K8sConfig.Version}.0",
pullPolicy = "IfNotPresent"
},
["priorityClassName"] = "system-cluster-critical",
["serviceMonitor"] = new
{
enabled = true,
@namespace = "kube-system",
selector = new { }
},
//["prometheusRule"] = new
//{
// enabled = true,
// @namespace = "kube-system",
// rules = new[] { new { } }
//},
["cloudProvider"] = "aws",
["autoDiscovery"] = new
{
enabled = true,
clusterName = tuple.ClusterName
},
["awsRegion"] = AwsConfig.Region,
["extraArgs"] = new Dictionary<string, object>
{
["v"] = 3,
["balance-similar-node-groups"] = true,
["expander"] = "least-waste",
["skip-nodes-with-local-storage"] = false,
["skip-nodes-with-system-pods"] = false
},
["podAnnotations"] = new Dictionary<string, string> { ["<http://cluster-autoscaler.kubernetes.io/safe-to-evict|cluster-autoscaler.kubernetes.io/safe-to-evict>"] = "false" },
["rbac"] = new { serviceAccount = new { annotations = new Dictionary<string, string> { ["<http://eks.amazonaws.com/role-arn|eks.amazonaws.com/role-arn>"] = tuple.RoleArn } } }
}.ToDictionary()); // workaround <https://github.com/pulumi/pulumi/issues/8013>
new Release("cluster-autoscaler",
new ReleaseArgs
{
Namespace = "kube-system",
Name = "cluster-autoscaler",
RepositoryOpts = new RepositoryOptsArgs { Repo = "<https://kubernetes.github.io/autoscaler>" },
Chart = "cluster-autoscaler",
Version = K8sConfig.ClusterAutoscalerChartVersion,
Values = clusterAutoscalerValues,
Atomic = true
},
new CustomResourceOptions { DependsOn = kubePrometheusStackCrds, Provider = k8sProvider });
sparse-park-68967
10/12/2021, 3:27 PMsquare-energy-17741
10/13/2021, 2:54 AM