-
Notifications
You must be signed in to change notification settings - Fork 418
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
base: develop
Are you sure you want to change the base?
Changes from all commits
724d957
c187fdf
161e3bc
d9308f2
3af663d
1f9678e
b0f8421
89b1cec
e3603ff
0f88313
a725016
2dd5ffc
5889ff4
2c454c1
4809710
0f57e2d
f959466
cfa1f6e
8702209
4690dd7
412c20f
35f6195
31ab7f6
f77ce5c
a22da27
a646e09
4db00bb
ed5b2ea
df19179
a7780ad
2832455
b21e1ce
1886a60
3957f27
9bbbe34
8c68c3b
1c3e8fe
404c42b
50abead
c87dc0b
d6437f4
c9ea798
387ef4f
b98b245
00818bf
0cb474a
80d669f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{- if and (.Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints") (.Values.global.platforms.openshift.scc.clusterController) (.Values.clusterController.enabled) }} | ||
apiVersion: security.openshift.io/v1 | ||
kind: SecurityContextConstraints | ||
metadata: | ||
name: {{ template "kubecost.clusterControllerName" . }} | ||
priority: 10 | ||
allowPrivilegedContainer: true | ||
allowHostDirVolumePlugin: true | ||
allowHostNetwork: true | ||
allowHostPorts: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this would now be |
||
allowHostPID: false | ||
allowHostIPC: false | ||
readOnlyRootFilesystem: false | ||
runAsUser: | ||
type: RunAsAny | ||
fsGroup: | ||
type: RunAsAny | ||
seLinuxContext: | ||
type: RunAsAny | ||
supplementalGroups: | ||
type: RunAsAny | ||
seccompProfiles: | ||
- runtime/default | ||
volumes: | ||
- hostPath | ||
- projected | ||
- configMap | ||
hostPorts: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
- min: 9731 | ||
max: 9731 | ||
users: | ||
- system:serviceaccount:{{ .Release.Namespace }}:{{ template "kubecost.clusterControllerName" . }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,7 +256,6 @@ spec: | |
ports: | ||
- name: http-server | ||
containerPort: 9731 | ||
hostPort: 9731 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
serviceAccount: {{ template "kubecost.clusterControllerName" . }} | ||
serviceAccountName: {{ template "kubecost.clusterControllerName" . }} | ||
{{- with .Values.clusterController.tolerations }} | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
# When OpenShift is enabled, the following securityContext will be applied to all resources unless they define their own. | ||||||
securityContext: | ||||||
runAsNonRoot: true | ||||||
seccompProfile: | ||||||
type: RuntimeDefault | ||||||
|
||||||
# networkCosts: | ||||||
# enabled: true # Enable network costs. | ||||||
# prometheus: | ||||||
# nodeExporter: | ||||||
# enabled: true # Enable Prometheus Node Exporter. |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
# When OpenShift is enabled, the following securityContext will be applied to all resources unless they define their own. | ||||||
securityContext: | ||||||
runAsNonRoot: true | ||||||
|
There was a problem hiding this comment.
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
.