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

Adding OpenShift SCC clusterController, removing hostPort #3677

Open
wants to merge 47 commits into
base: develop
Choose a base branch
from

Conversation

kc-adawson
Copy link
Contributor

Adding OpenShift SCC for clusterController, removing hostPort on clusterController

What does this PR change?

Does this PR rely on any other PRs?

How does this PR impact users? (This is the kind of thing that goes in release notes!)

Links to Issues or tickets this PR addresses or fixes

What risks are associated with merging this PR? What is required to fully test this PR?

How was this PR tested?

Ran on Openshift cluster successfully

Have you made an update to documentation? If so, please provide the corresponding PR.

cliffcolvin and others added 30 commits August 21, 2024 19:42
Commit auto-generated by release script.

Signed-off-by: Cliff Colvin (release bot variant) <ccolvin@kubecost.com>
Bump in-code version of v2.4 branch for 2.4.0-rc.0
bump kubecost-modeling for cve fixes (cherry-pick #3606)
Commit auto-generated by release script.

Signed-off-by: Cliff Colvin (release bot variant) <ccolvin@kubecost.com>
Bump in-code version of v2.4 branch for 2.4.0-rc.1
bump network costs to 0.17.5 (cherry-pick #3629)
Commit auto-generated by release script.

Signed-off-by: Cliff Colvin (release bot variant) <ccolvin@kubecost.com>
Bump in-code version of v2.4 branch for 2.4.0-rc.2
switch grafana image for cve resolution (cherry-pick #3627)
update prometheus to chainguard for CVE-2024-41110 (cherry-pick #3625)
* Add ingestion config for standard discount

* Remove statefulset check in ingestionconfig

* Fix nil in ingestion config

* Fix nil in _helpers.tpl for standard discount

* Re-add statefulset check in ingestionconfig
* fix diagnostics and federatedStorageConfig

* Few more places that needed to reference federatedStorageConfig

* Simplify logic for MultiClusterDiagnostics in costmodel.

---------

Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com>
Co-authored-by: thomasvn <thomasnguyen96@gmail.com>
Commit auto-generated by release script.

Signed-off-by: Cliff Colvin (release bot variant) <ccolvin@kubecost.com>
Bump in-code version of v2.4 branch for 2.4.0-rc.3
…on API (#3635) (#3646)

* [ENG-2674] Add routes

* Drop location from kubecost.yaml
Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com>
…vingsRecommendationsAllowLists (#3645) (#3650)

* [ENG-2729] Add resource reference files for kubecostProductConfigs.savingsRecommendationsAllowLists

Co-authored-by: Bianca Burtoiu <bianca@kubecost.com>
* bump cluster-controller 0.16.9
Signed-off-by: Cliff Colvin <ccolvin@kubecost.com>

* remove inadvertent checkin
Signed-off-by: Cliff Colvin <ccolvin@kubecost.com>
bump cluster-controller 0.16.9 (cherry-pick #3652)
bump kubecost-modeling 0.1.16 (cherry-pick #3655)
* remove helm rollout restarter

Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com>
…#3660) (#3661)

* add GPU utilization widget



* Update cost-analyzer/grafana-dashboards/pod-utilization.json



---------

Signed-off-by: chipzoller <chipzoller@gmail.com>
Co-authored-by: Chip Zoller <chipzoller@gmail.com>
Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com>
cliffcolvin and others added 15 commits September 12, 2024 21:01
bump network-costs 0.17.6 (cherry-pick #3662)
* Add new container costs and resources endpoints to nginx

* Add value for configuring container resource usage retention in days

Co-authored-by: Niko Kovacevic <nikovacevic@gmail.com>
Commit auto-generated by release script.

Signed-off-by: Cliff Colvin (release bot variant) <ccolvin@kubecost.com>
Bump in-code version of v2.4 branch for 2.4.0-rc.4
Commit auto-generated by release script.

Signed-off-by: Cliff Colvin (release bot variant) <ccolvin@kubecost.com>
Bump in-code version of v2.4 branch for 2.4.0-rc.5
Signed-off-by: Cliff Colvin <ccolvin@kubecost.com>
Commit auto-generated by release script.

Signed-off-by: Cliff Colvin (release bot variant) <ccolvin@kubecost.com>
Bump in-code version of v2.4 branch for 2.4.0-rc.6
aggregator custom labels template

Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com>
Commit auto-generated by release script.

Signed-off-by: Cliff Colvin (release bot variant) <ccolvin@kubecost.com>
Bump in-code version of v2.4 branch for 2.4.0
…terController

Adding OpenShift SCC for clusterController, removing hostPort on clusterController
@@ -256,7 +256,6 @@ spec:
ports:
- name: http-server
containerPort: 9731
hostPort: 9731
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexkubecost I can dig here, but do you know off hand why we would need hostPort?

I don't understand why anything would be connecting to the clusterController that doesn't know the service name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't currently think of any reason why hostPort would be needed. @ameijer ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll bet you that this yaml was written from an example where they exposed an http port on a node and the ingress controller routed to that. I agree there is rarely if ever a use case for a host port on non daemon set controllers. I think getting rid of it is a great idea

- hostPath
- projected
- configMap
hostPorts:
Copy link
Collaborator

@jessegoodier jessegoodier Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can kill these hostPort lines if Alex is good with removing hostPort.

@thomasvn
Copy link
Member

Once this is approved, let's make sure this is merged into both v2.4 and develop branches.

Add space to fix linting error to allow CI to complete against the remainder of these changes.

Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com>
@chipzoller chipzoller changed the base branch from v2.4 to develop September 23, 2024 17:01
@chipzoller
Copy link
Collaborator

Changed branch to develop so need to go back through this.

@@ -1425,7 +1425,7 @@ data:
"carbonEstimatesEnabled": "{{ template "carbonEstimatesEnabled" . }}",
"clusterControllerEnabled": "{{ template "clusterControllerEnabled" . }}",
"forecastingEnabled": "{{ template "forecastingEnabled" . }}",
"chartVersion": "DEVELOP_BRANCH",
"chartVersion": "2.4.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to change this now it's targeting develop.

allowPrivilegedContainer: true
allowHostDirVolumePlugin: true
allowHostNetwork: true
allowHostPorts: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this would now be false, right, if there are no hostPorts?

@@ -12,14 +12,11 @@ global:
scc:
nodeExporter: false # Creates an SCC for Prometheus Node Exporter. This requires Node Exporter be enabled.
networkCosts: false # Creates an SCC for Kubecost network-costs. This requires network-costs be enabled.
clusterController: false # Creates an SCC for Kubecost clusterContoller. This requires clusterController be enabled.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
clusterController: false # Creates an SCC for Kubecost clusterContoller. This requires clusterController be enabled.
clusterController: false # Creates an SCC for Kubecost clusterController. This requires clusterController be enabled.

@@ -247,6 +247,7 @@ global:
scc:
nodeExporter: false # Creates an SCC for Prometheus Node Exporter. This requires Node Exporter be enabled.
networkCosts: false # Creates an SCC for Kubecost network-costs. This requires network-costs be enabled.
clusterController: false # Creates an SCC for Kubecost clusterContoller. This requires clusterController be enabled.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
clusterController: false # Creates an SCC for Kubecost clusterContoller. This requires clusterController be enabled.
clusterController: false # Creates an SCC for Kubecost clusterController. This requires clusterController be enabled.

@kc-adawson
Copy link
Contributor Author

Hi all, after further testing, it seems all that is needed it the removal of the hostport from kubecost-cluster-controller-template.yaml. Once that is done, no specific SCCs will be needed. Maybe the Platforms.Openshift.True can remove hostport if we want to leave it on for other deployments? Either way, the SCC file is not needed.

@chipzoller
Copy link
Collaborator

So what's the plan here?

@kc-adawson
Copy link
Contributor Author

kc-adawson commented Oct 14, 2024 via email

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

Successfully merging this pull request may close these issues.

8 participants