In this video we actually wrote the business logic to validate the kluster resource to make sure the version that is specified in kluster resource is supported by DigitalOcean.
We also looked into how we can get the admissionreview object from http request body and then eventually get kluster resource spec from admissionreview object.
And we eventually wrote admissionreview object with correct admissionresponse back to http handler.
Kluster Operator Playlist:
• Generating ClientSet/I...
First Video of this series:
• Writing Validating Web...
GitHub:
github.com/viveksinghggits/va...
Web:
viveksingh.dev/
00:00 Introduction
00:22 Agenda
00:32 Summary of UseCase/Problem
04:29 Things done in previous video
05:15 Get the request body from HTTP request
06:30 Get AdmissionReview object from request body
15:17 Get Kluster resource from AdmissionReview.Request
24:03 Test if we are getting Kluster resource successfully
32:53 Validating Kluster resource
34:30 Looking into AdmissionResponse object
37:22 Forming AdmissionResponse object
41:48 Implement validation of Kluster resource
51:57 Read DO token secret
58:23 Testing things again
01:00:41 Write AdmissionResponse back to response
01:04:12 Resolving nil pointer
01:06:06 Improve error logging
01:10:17 Testing things again
01:11:27 Got RBAC problem while reading token secret
01:12:10 Use custom ServiceAccount in Val Webhook deployment
01:12:44 Create other RBAC resources
01:15:34 Testing things again
01:18:27 Encountered nil pointer again (flag redefined)
01:19:28 Rename kubeconfig flag to konfig (wouldn't work) and test
01:21:17 nil pointer again because of incorrect condn statement
01:25:00 Problem with sending response back
01:27:25 Write AdmissionReview back instead of AdmissionResponse
01:28:37 Testing things again
01:29:54 Explanation on Request and Response of Webhook controller
01:31:03 Check unsupported DO k8s version
01:31:30 nil pointer problem again (redefined konfig)
01:32:08 Resolve the previous problem
01:34:48 Testing things again (Everything worked)
01:37:40 Responding with errors correctly
01:39:01 Summary
01:40 Like, Share and Subscribe
28 июн 2024