Skip to content

Charts[Gateway] Unable to install chart in a new namespace #353

@leninmehedy

Description

@leninmehedy

Bill of Materials or CLI Version

No response

Execution Environment

JUnit Extensions

Slf4j Logging Implementation

None

To Reproduce

  1. Deploy chart in namespace-1
  2. Attempt to deploy helm chart in namespace-2

It errors with message:

Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: ClusterRole "pod-monitoring-role" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata;

Describe the bug

There are two issues as below:

  1. We are currently creating "pod-monitoring-role" ClusterRole to be able to run helm chart test container with necessary access. However, we don't need to create the ClusterRole every time we deploy the chart.

Therefore, "pod-monitoring-role" ClusterRole needs to be deployed only once as shared resource. Ideally, we should also be able to remove after helm chart test is executed.

  1. Besides the shared GatewayClass also exhibit the same issue and therefore needs to be installed as shared resource.

Describe the expected behavior

A user should be able to deploy the helm chart to multiple namespaces

Whole JUnit/CLI Logs

helm install fst-namespace-test2 -n fst-lenin2  hedera-network                          
                                                                                                                                     
Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: ClusterRole "pod-monitoring-role" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "fst-namespace-test2": current value is "fst-namespace-test"; annotation validation error: key "meta.helm.sh/release-namespace" must equal "fst-lenin2": current value is "fst-lenin"

Additional Context

No response

### Tasks
- [ ] https://github.com/hashgraph/full-stack-testing/issues/358
- [ ] https://github.com/hashgraph/full-stack-testing/issues/359
- [ ] https://github.com/hashgraph/full-stack-testing/issues/361

Metadata

Metadata

Assignees

Labels

BugA error that causes the feature to behave differently than what was expected based on design docsreleased

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions