Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeated force install fails #348

Closed
tipame opened this issue Jan 25, 2024 · 2 comments
Closed

Repeated force install fails #348

tipame opened this issue Jan 25, 2024 · 2 comments
Assignees

Comments

@tipame
Copy link

tipame commented Jan 25, 2024

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

Environment (plugin version, maven version, OS, ...):
plugin version: 6.13.0
mvn version: 3.8.1
helm version: 3.8.0

What happened:

  1. Plugin configuration:
<configuration>
    <chartDirectory>helm/</chartDirectory>
    <chartVersion>0.1.0</chartVersion>
    <useLocalHelmBinary>true</useLocalHelmBinary>
    <installForce>true</installForce>
</configuration>
  1. helm:install done successfylly, created resource has annotations:
meta.helm.sh/release-name: my-app
meta.helm.sh/release-namespace: my-namespace
  1. helm:dry-run fail with error
[ERROR] Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: ServiceAccount "my-app" in namespace "my-namespace" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "my-app-1706159052": current value is "my-app"
  1. helm:install fail with error:
[ERROR] Error: unknown flag: --force
  1. helm:uninstall done successfylly

What you expected to happen:
3) I'm using installForce=true In my configuration and expect repeated instalation (without uninstall) will work fine.
So i do not understend why there is inconsistency between install command (creates meta.helm.sh/release-name without uid) and dry-run command (expects meta.helm.sh/release-name with uid).
4) Expect Helm version: 3.8.0 - supports install force flag.

How to reproduce it (as minimally and precisely as possible):
Test resource:

apiVersion: v2
name: my-app
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
appVersion: "1.16.0"
apiVersion: v1
kind: ServiceAccount
metadata:
  name: my-app
  namespace: my-namespace
@sschnabe
Copy link
Member

@tipame Name for install was fixed with #353. --force is not supported by 3.8.0 and was added with 3.11.0. Can you check with updated helm/plugin?

@sschnabe
Copy link
Member

Closing due missing feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants