feat: add flag on member-agent-arc chart to add new label for CRDs#1253
feat: add flag on member-agent-arc chart to add new label for CRDs#1253Arvindthiru merged 12 commits intoAzure:mainfrom
Conversation
3384aa9 to
a9c1e56
Compare
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
c0abce8 to
e85d9ac
Compare
| // ModeMember installs member cluster CRDs. | ||
| ModeMember = "member" | ||
| // ModeArcMember installs member cluster CRDs with ARC member label value. | ||
| ModeArcMember = "arcMember" |
There was a problem hiding this comment.
I thought this would be called aksAsArcMember?
There was a problem hiding this comment.
or we want to treat them the same?
There was a problem hiding this comment.
Good question, I don't think there is a reason (as of now) to differenetiate here.
Our (AKS) script just needs to know it's an ArcMember; if the cluster is not a MC, then it's just an annotation on a CRD in unmanaged space, i.e., no-op.
There was a problem hiding this comment.
the reason I ask is if we use arcMember now and need to differentiate later for askAsArc, the code here needs to change.
There was a problem hiding this comment.
given that we might achieve the entire crdInstaller, I guess this is not an issue anymore @Arvindthiru ?
| klog.Fatal("--mode flag must be either 'hub' or 'member'") | ||
| if *mode != utils.ModeHub && *mode != utils.ModeMember && *mode != utils.ModeArcMember { | ||
| klog.Fatal("--mode flag must be either 'hub' or 'member' or 'arcMember'") | ||
| } |
There was a problem hiding this comment.
nit: might read better to to have valid modes as a private var and helper func.
e.g.,
var validModes = []string{
utils.ModeHub,
utils.ModeMember,
utils.ModeArcMember,
}
func isValidMode(m string) bool {
for _, v := range validModes {
if v == m {
return true
}
}
return false
}
if !isValidMode(*mode) {
klog.Fatalf("--mode must be one of: %s", strings.Join(validModes, ", "))
}
Ealianis
left a comment
There was a problem hiding this comment.
Approved with nit suggestion.
Description of your changes
Fixes #
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer