cloudoperators / heureka

Security and compliance management
Apache License 2.0
3 stars 1 forks source link

🐛 [BUG] - Deployment exposes port twice #214

Open IvoGoman opened 2 months ago

IvoGoman commented 2 months ago

Priority

None

Description

The Heureka Chart can currently not be installed, because the '.Values.service.port' is exposed twice as two different named ports. This is not allowed and results in:

Helm diff failed: failed to server-side diff Deployment/heureka: failed
        to patch object: failed to create manager for existing fields: failed to convert
        new object (greenhouse/heureka; apps/v1, Kind=Deployment) to smd typed: .spec.template.spec.containers[name="heureka"].ports:
        duplicate entries for key [containerPort=8080,protocol="TCP"]

Reproduction steps

1. Go to 'Greenhouse QA Dashboard'
2. View the Heureka Plugin's 'Raw Data'
3. Scroll down to '.status'
4. See error

Manifests

No response

Screenshots

No response

IvoGoman commented 1 month ago

@drochow @dimtas could you take a look?

IvoGoman commented 1 month ago

The problem still persists: https://github.com/cloudoperators/heureka/blob/f04feabc6b81521f81efa368c0356b613e9fc763/charts/heureka/templates/deployment.yaml#L67-L72

dimtas commented 2 weeks ago

@IvoGoman can you please verify that this is fixed?

IvoGoman commented 1 week ago

Looks good with regards to the port. Could you provide an update to the PluginDefinition?

Metrics scraping from within Greenhouse will not be possible with how the chart is currently configured, as it is hard-coded to the Kubernetes prometheis from our internal infrastructure.

dimtas commented 1 week ago

Currently we deploying the chart using helm manually and not using the gh workflow since it's in development. I guess this is why it doesn't shown.

IvoGoman commented 1 week ago

I only noticed this because the Chart is added to the PluginDefinition and thus gets deployed. In this case the reconciliation for the chart is continuously failing.

dimtas commented 1 week ago

I see. So, if I bump up the version to 3.0.1 in here: https://github.com/cloudoperators/greenhouse-extensions/blob/59d07c21da02176a5392511f3e4aacfaee8fd51f/heureka/plugindefinition.yaml#L18

This will suppress the warning?

IvoGoman commented 1 week ago

Yes, best to also bump the patch level on the PluginDefinition as well

IvoGoman commented 1 hour ago

I just noticed that the chart version was not bumped in this repo, but only in the greenhouse-extensions.