AUTOSCALE-1045: feat: add OpenShiftAzureNodeClass API and controller #44
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 375 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.355
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #44"
general
weight: 0.35
LucasAndFlores
TODO
- created AUTOSCALE-1061 for this, porting the test suite is a bigger thing...
Overview
API related
This PR adds the
karpenter.hypershift.openshift.io/v1alpha1OpenShiftAzureNodeClassas our customer-facing NodeClass for Karpenter on Azure hosted control planes. It wraps the Azure provider'sAKSNodeClassthe same wayOpenshiftEC2NodeClasswrapsEC2NodeClass.It is called ...AzureNodeClass and not ...AKSNodeClass as our azure karpenter provider fork works on OpenShift, BUT: Not by reusing the AKS specific stuff but rather by a few OpenShift specific branches in the code. This also means, we don't support everything
AKSNodeClassdoes which is why there are only a few fields in theOpenShiftAzureNodeClasscompared to the upstream CRD.To make things more complex: Upstream has a proposal for an
AzureNodeClass- which to my understanding - is what we're doing partially in our OpenShift mode in the azure provider. This is another argument to name thisOpenShiftAzureNodeClass.Btw: the AWS CRD uses a lower case
sinOpenshift, I decided to not be consistent with that and choose the correctOpenShift...writing.I chose
v1alpha1as version for this reason.The comments/validations seem quite verbose but are based on the HyperShift NodePool, see e.g. https://github.com/openshift/hypershift/blob/4a9464564590cb53be1031f2bd8e77f26ee09b56/api/hypershift/v1beta1/azure.go#L83-L106 .
AzureEncryptionAtHostusesEnabledandDisabled, I couldn't come up with something less booleanish. It also defaults toDisabledin hypershift and the upstream karpenter provider as there is - compared to AWS - an impact on the hosts that support this and requires AFAIU something configured in the Azure resource group.As far as I understand the related docs this approach should be OK.
The Rest
About the rest besides the CRD: It is pretty similar what we do in the EC2 NodeClass Controller, see #43 .
AKSNodeClassand sync the status.- compared to the EC2 code I moved it into a separate controller as these are separate concerns
userDataandmarketplaceImagestay unset until the ignition pipeline provides them (AUTOSCALE-970), so nodes can't launch yet.