agreeable-ram-97887
05/05/2021, 10:49 AMDuplicate resource URN 'urn:pulumi:prod::submission_strategy::<kubernetes:helm.sh/v3:Chart$kubernetes:apiregistration.k8s.io/v1:APIService::v1beta1.metrics.k8s.io>'; try giving it a unique name
Note that I am already using the resource_prefix
argument in my “ChartOpts” object to separate the resources URI’s for each cluster, and except for the one “APIService” resource this appears to work as expected.
Looking into the docs, I don’t see a clear way to specify the “APIService” resource URN 😕. Anyone have any suggestions ?# Install "metrics-server"
for env in BUILD_ENVIRONMENTS:
with open(path.join(FILE_DIR, "metrics_values.yaml")) as fin:
metrics_values = yaml.load(fin)
k8s.helm.v3.Chart(
f"metrics-server",
k8s.helm.v3.ChartOpts(
chart="metrics-server",
repo="bitnami",
fetch_opts=k8s.helm.v3.FetchOpts(
repo="<https://charts.bitnami.com/bitnami>",
version="5.8.6",
),
values=metrics_values,
resource_prefix=env,
),
opts=pulumi.ResourceOptions(
provider=k8s_providers[env],
depends_on=eks_node_groups[env],
),
)
lemon-monkey-228
05/05/2021, 11:07 AMresource_prefix
is for the k8s resources the Helm chart createsk8s.helm.v3.Chart
resource, which is metrics-server
in this casef"metrics-server-{env}"
agreeable-ram-97887
05/05/2021, 11:12 AMlemon-monkey-228
05/05/2021, 11:12 AMagreeable-ram-97887
05/05/2021, 11:13 AMlemon-monkey-228
05/05/2021, 11:15 AMagreeable-ram-97887
05/05/2021, 11:16 AMIn environments where I can just nuke it and redeployYeah, if I were only building one environment at a time, then this would work. But the issue is specifically something I’ve run into when trying to manage multiple environment stages in one project 🙈
resource_prefix
input 🤔lemon-monkey-228
05/05/2021, 12:05 PMagreeable-ram-97887
05/05/2021, 12:14 PMlemon-monkey-228
05/05/2021, 12:15 PM