-
Notifications
You must be signed in to change notification settings - Fork 43
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
Migrate to openshift 4.11 #241
Migrate to openshift 4.11 #241
Conversation
af24c7b
to
8868e63
Compare
@Mo3m3n Tried running it locally on a 4.11 cluster. Fails with the below error:
|
@bnallapeta
I will see if I can ask for more specific debug output from |
Can you provide the following: |
@bnallapeta It turns out this requires argocd CLI v2.3.7 or above in order to be able to create serviceaccount token for v1.24 clusters. |
@Mo3m3n As discussed, with OpenShift 4.11, it looks like scc: restricted-v2 is automatically applied to deployments which brings the capabilities mentioned below as per this blog that you had linked in the other commit.
Do verify this on a new cluster post which we won't have to manually patch things. |
@bnallapeta
Users will get that for the kcp syncer deployment and you can also see the warning for the kcp pod deployment by updating the followin:
For now it is a warning and my understanding is that in the future it will be denied (unless we update the security policy
We can ignore this for now but my understanding is that we need to patch the deployments sooner or later. |
6000a22
to
731426a
Compare
731426a
to
aaec3c4
Compare
aaec3c4
to
b4a57f2
Compare
2229644
to
b9eb388
Compare
38c6eee
to
e7c1c22
Compare
e7c1c22
to
c1fdcc5
Compare
c1fdcc5
to
402d263
Compare
402d263
to
b1d8cb0
Compare
@Mo3m3n Please take a look at the failed ckcp test. @xinredhat Kindly assist if its a CI issue rather than the PR issue. |
/retest |
1 similar comment
/retest |
ckcp/openshift_dev_setup.sh
Outdated
# This is enabled by default in restricted-v2 available in openshift >= 4.11 | ||
if ! (set +o pipefail && kubectl describe scc restricted restricted-v2 2>/dev/null | | ||
grep -sq 'runtime/default') ; then | ||
kubectl patch scc restricted --type=merge -p '{"seccompProfiles":["runtime/default"]}' |
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.
We should not patch SCCs installed by OpenShift. These changes will be removed by the cluster operators.
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.
So I would rather create a clone of that scc, patch it and assign it to the corresponding sa.
Correct ?
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.
Am I correct in that the reason this is here is because the restricted SCC doesn't allow any value to be set for the seccomp profile?
Since this is only for ckcp
, I think it makes sense to declare OpenShift 4.11 as a required prerequisite. We don't deploy ckcp
in the actual service (it is a dev/testing tool).
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.
Right @adambkaplan the restricted SCC in 4.10 does not allow have this securityContext.
You may ask, why I am changing that in 4.10 while the target of the PR is 4.11? reason is that 4.11 pushes for a restricted security context(via warnings).
The change works out of the box in 4.11 but the same securitContext requires patching scc in 4.10.
For the sake of consistency I was trying to patch scc in 4.10 to work around that.
We have multiple options:
- backport the security context change in 4.10. In this case I will need assistance from openshift support. I have tried this doc and I did not succeed.
- Don't add securityContext in 4.10 and warn users that the securitycontext of kcp pod is not the same between 4.10 and 4.11
- Don't add security Context in 4.10 and declare that 4.11 is a required Prerequisite.
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.
So the root issue here is that our ckcp
deployment needs this additional security context. For now this will produce a warning. However, in 4.12 OpenShift will start enforcing the restricted profile by default, so we should adhere to best practices.
I personally would keep the additional security context declare 4.11 as a prerequisite for development work. @Roming22 I assume once this lands, we will be upgrading our staging cluster to 4.11 as well?
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.
@adambkaplan Correct, we would either upgrade the existing cluster, or request a new cluster to deploy the service on, before deprecating the 4.10 cluster.
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.
@Mo3m3n I'm fine with making 4.11 a prerequisite, we don't really have the bandwidth to support multiple OCP versions at the moment. By the time we might do it, 4.12 will be out and since we will probably limit support to n
and n-1
version, that would again rule out 4.10.
b1d8cb0
to
d2d6f6d
Compare
d2d6f6d
to
8b07995
Compare
@@ -6,11 +6,11 @@ | |||
|
|||
| **Component** | **Version** | **Purpose** | **Comments** | | |||
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |||
| OpenShift | 4.10 | Platform | Upgrades to next versions 4.11 need to be tested and approved | | |||
| OpenShift | 4.11 | Platform | Upgrades to next versions 4.11 need to be tested and approved | |
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.
Comments - Upgrades to next versions 4.12 need to be tested and approved
Starting from Openshift 4.11 (kubernetes 1.24), service account token secrets are no longer automatically generated. Thus service account tokens will be manually created.
Starting from openshift 4.11, the global Pod Security Admission Policy is set to emit warnings when running pods that does not meet a restricted security Policy: https://cloud.redhat.com/blog/pod-security-admission-in-openshift-4.11 Also: > In a subsequent release, we intend to move the global configuration > to enforce the “restricted” pod security profile globally Thus now kcp pods are deployed with a restricted security context WARNING, this introduces a breaking change and neither syncers nor ckcp script can be deployed in Openshift 4.10, unless a scc supporting Seccomp profile runtime default is used in openshift for the corresponding service accounts
8b07995
to
900ea2c
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Mo3m3n The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…e-pr Enable all-namespaces mode for pvc-cleaner.
Migrating Openshift 4.11 requires: