Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bindata/assets/deployments/console-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ spec:
component: ui
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
openshift.io/required-scc: restricted-v2
openshift.io/required-scc: restricted-v3
spec:
nodeSelector:
node-role.kubernetes.io/master: ""
restartPolicy: Always
serviceAccountName: console
schedulerName: default-scheduler
hostUsers: false
securityContext:
runAsNonRoot: true
seccompProfile:
Expand Down
3 changes: 2 additions & 1 deletion bindata/assets/deployments/downloads-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ spec:
component: downloads
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
openshift.io/required-scc: restricted-v2
openshift.io/required-scc: restricted-v3
spec:
nodeSelector:
kubernetes.io/os: linux
node-role.kubernetes.io/master: ""
terminationGracePeriodSeconds: 0
hostUsers: false
securityContext:
runAsNonRoot: true
seccompProfile:
Expand Down
11 changes: 8 additions & 3 deletions pkg/console/subresource/deployment/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestDefaultDeployment(t *testing.T) {
infrastructureConfigResourceVersionAnnotation: "",
consoleImageAnnotation: "",
workloadManagementAnnotation: workloadManagementAnnotationValue,
requiredSCCAnnotation: "restricted-v2",
requiredSCCAnnotation: "restricted-v3",
}

consoleDeploymentAffinity := &corev1.Affinity{
Expand Down Expand Up @@ -244,6 +244,7 @@ func TestDefaultDeployment(t *testing.T) {
RestartPolicy: corev1.RestartPolicyAlways,
SchedulerName: corev1.DefaultSchedulerName,
TerminationGracePeriodSeconds: &gracePeriod,
HostUsers: ptr.To(false),
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: utilpointer.Bool(true),
SeccompProfile: &corev1.SeccompProfile{
Expand Down Expand Up @@ -322,6 +323,7 @@ func TestDefaultDeployment(t *testing.T) {
RestartPolicy: corev1.RestartPolicyAlways,
SchedulerName: corev1.DefaultSchedulerName,
TerminationGracePeriodSeconds: &gracePeriod,
HostUsers: ptr.To(false),
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: utilpointer.Bool(true),
SeccompProfile: &corev1.SeccompProfile{
Expand Down Expand Up @@ -400,6 +402,7 @@ func TestDefaultDeployment(t *testing.T) {
RestartPolicy: corev1.RestartPolicyAlways,
SchedulerName: corev1.DefaultSchedulerName,
TerminationGracePeriodSeconds: &gracePeriod,
HostUsers: ptr.To(false),
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: utilpointer.Bool(true),
SeccompProfile: &corev1.SeccompProfile{
Expand Down Expand Up @@ -471,6 +474,7 @@ func TestDefaultDeployment(t *testing.T) {
RestartPolicy: corev1.RestartPolicyAlways,
SchedulerName: corev1.DefaultSchedulerName,
TerminationGracePeriodSeconds: &gracePeriod,
HostUsers: ptr.To(false),
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: utilpointer.Bool(true),
SeccompProfile: &corev1.SeccompProfile{
Expand Down Expand Up @@ -1627,6 +1631,7 @@ func TestDefaultDownloadsDeployment(t *testing.T) {
TolerationSeconds: &tolerationSeconds,
},
},
HostUsers: ptr.To(false),
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: utilpointer.Bool(true),
SeccompProfile: &corev1.SeccompProfile{
Expand Down Expand Up @@ -1742,7 +1747,7 @@ func TestDefaultDownloadsDeployment(t *testing.T) {
Labels: labels,
Annotations: map[string]string{
workloadManagementAnnotation: workloadManagementAnnotationValue,
requiredSCCAnnotation: "restricted-v2",
requiredSCCAnnotation: "restricted-v3",
},
},
Spec: downloadsDeploymentPodSpecSingleReplica,
Expand Down Expand Up @@ -1785,7 +1790,7 @@ func TestDefaultDownloadsDeployment(t *testing.T) {
Labels: labels,
Annotations: map[string]string{
workloadManagementAnnotation: workloadManagementAnnotationValue,
requiredSCCAnnotation: "restricted-v2",
requiredSCCAnnotation: "restricted-v3",
},
},
Spec: *downloadsDeploymentPodSpecHighAvail,
Expand Down