-
Notifications
You must be signed in to change notification settings - Fork 374
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
Update CertificateSigningRequest apiversion to V1 #588
Conversation
/release-note-none |
@xing-yang Could You please take a look |
When i update apiVersion to v1 ,i found we have to add Here is the outputs for pods and deployments kubectl get deployment -n cr |
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.
Can you run tests with invalid snapshots and verify that they are rejected by the webhook?
kind: CertificateSigningRequest | ||
metadata: | ||
name: ${csrName} | ||
name: ${csrName} |
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.
It's better to indent 2 spaces rather than 1. Can you change this back?
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.
Can you change this back? There's no need to make this change.
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.
Done.PTAL
- digital signature | ||
- key encipherment | ||
- server auth | ||
groups: |
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.
It's better to indent 2 spaces rather than 1. Can you change this back?
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.
Sure i will addressed this changes
3856875
to
cf09bf8
Compare
@xing-yang i have addressed the changes regarding space indentation. I have validate the invalid snapshot v1 yaml for testing with webhook server as described in README and got the output as |
@lajiao117 Does this PR fix your problem? |
@xing-yang didn't, i used the signerName: kubernetes.io/kube-apiserver-client ,the webhook logs this err: k8s version is:v1.21.2 |
@lajiao117 @xing-yang i have checked this in my environment and it's running fine. @lajiao117 if it's possible could you try this on another k8s cluster to recheck it. i have used minikube and kubeadm for respective versions |
@Kartik494 i recheck another k8s cluster ,it's the same err i use the v1beta1 it works well |
@Kartik494 i used the webhook: https://github.com/kubernetes-csi/external-snapshotter/tree/v3.0.3 cat <<EOF | kubectl create -f -
|
SO this error occur in latest release also i.e 4.2.1? |
@Kartik494 i just try 4.2.1,it logs the same err |
@lajiao117 Thanks for the update i got the output as |
i have doubt in the script file that is it ok to change |
Please refer this documentation here there is a specific term for use as client in authorization i.e |
@Kartik494 i readed the doc, the script is no diffirent from the doc, |
usages: | ||
- digital signature | ||
- key encipherment | ||
- server auth | ||
- client auth |
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.
Why do we change or remove the server auth ?
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.
spec: | ||
groups: | ||
- system:authenticated | ||
request: $(cat ${tmpdir}/server.csr | base64 | tr -d '\n') | ||
signerName: kubernetes.io/kube-apiserver-client |
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.
signerName: kubernetes.io/kubelet-serving
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.
use v1 version, signerName: kubernetes.io/kubelet-serving the organizations must be ["system:nodes"
openssl req -new -key ${tmpdir}/server-key.pem -subj "/CN=system:node:${service}.${namespace}.svc;/O=system:nodes" -out ${tmpdir}/server.csr -config ${tmpdir}/csr.conf
cat <<EOF | kubectl create -f -
apiVersion: certificates.k8s.io/v1
kind: CertificateSigningRequest
metadata:
name: ${csrName}
spec:
groups:
- system:authenticated
request:$(cat $ {tmpdir}/server.csr | base64 | tr -d '\n')
signerName: kubernetes.io/kubelet-serving
usages: - digital signature
- key encipherment
- server auth
EOF
@Kartik494 this script is ok for v1 version |
cf09bf8
to
a74c6c2
Compare
@lajiao117 Thanks for helping me out for this script ,it's working fine in my environment too.I have added a commit for the same. |
@xing-yang @humblec Could you please take a look at this updated commit . Thanks |
a74c6c2
to
f8992bb
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Kartik494, xing-yang 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 |
@Kartik494 after this PR is merged, can you backport to release-5.0 branch? |
@xing-yang sure i will raise a PR for this. |
Update CertificateSigningRequest apiversion to V1
I think this actually needs a release note. |
Merge pull request #588 from Kartik494/ValidateWebhook
Fixes #587