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

Helm chart testing enhancement #5436

Open
RainbowMango opened this issue Aug 27, 2024 · 2 comments
Open

Helm chart testing enhancement #5436

RainbowMango opened this issue Aug 27, 2024 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@RainbowMango
Copy link
Member

What would you like to be added:

  1. Make images based on PR or the latest code and then test with them
  2. Make sure to cover all components

Why is this needed:

Currently, helm testing does not test against the latest code but the last images on image registry. When we introduce new parameters to a component the chart test will fail due to unrecognized parameters, see the example here: #5290 (comment).

In addition, the helm chart test coverage is not enough, it just tests part of the components, for example, the karmada-scheduler-estimator is not included in the test, that's why it passes #5273.

@RainbowMango RainbowMango added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 27, 2024
@RainbowMango
Copy link
Member Author

May be #4045 addresses part of this.

@RainbowMango RainbowMango added this to the v1.12 milestone Aug 28, 2024
@chaosi-zju
Copy link
Member

chaosi-zju commented Aug 28, 2024

here is another shortage I want to raise:

karmada-scheduler-estimator has installation problem when installMode=component.

just like:

I firstly execute helm install karmada -n karmada-system to install karmada main components.

then all karmada certs is stored in secret/{{.Release.Name}}-cert, since {{.Release.Name}} is karmada, so secret name is karmada-cert.

apiVersion: v1
kind: Secret
metadata:
name: {{ $name }}-cert
namespace: {{ $namespace }}

Then I execute helm install karmada-scheduler-estimator -n karmada-system --set installMode=component,components={"schedulerEstimator"} to install scheduler estimator independently.

the estimator needs to mount that secret/{{.Release.Name}}-cert to obtain karmada certs, however, now {{.Release.Name}} is karmada-scheduler-estimator (host cluster does not allow duplicate release names), so it will try to mount secret/karmada-scheduler-estimator-cert, which doesn't exist.

{{- define "karmada.scheduler.cert.volume" -}}
{{ $name := include "karmada.name" . }}
- name: karmada-certs
secret:
secretName: {{ $name }}-cert



Actually, metricsAdapter,search,descheduler when installMode=component has same problem, the original author gives a rough circumvention:

## @param search.certs certs of the search
certs: karmada-cert
## @param search.kubeconfig kubeconfig of the search
kubeconfig: karmada-kubeconfig

that is, redeclare the secret name in value.yaml to overwrite the original {{.Release.Name}}-cert.

but I think the best way is fix the secret name, don't prefix it with {{.Release.Name}}, which is mentioned in #5363.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
Status: No status
Development

No branches or pull requests

2 participants