-
Notifications
You must be signed in to change notification settings - Fork 38
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
adding mtls config #1170
base: main
Are you sure you want to change the base?
adding mtls config #1170
Changes from all commits
4e6fb19
f1041c0
be62733
2255bfe
ad026cf
5befbd4
c6cf2c2
d5a3b11
27bca0a
7b3986f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,9 @@ import ( | |
) | ||
|
||
var ( | ||
LimitadorGroupKind = schema.GroupKind{Group: limitadorv1alpha1.GroupVersion.Group, Kind: "Limitador"} | ||
AuthorinoGroupKind = schema.GroupKind{Group: authorinooperatorv1beta1.GroupVersion.Group, Kind: "Authorino"} | ||
LimitadorGroupKind = schema.GroupKind{Group: limitadorv1alpha1.GroupVersion.Group, Kind: "Limitador"} | ||
AuthorinoGroupKind = schema.GroupKind{Group: authorinooperatorv1beta1.GroupVersion.Group, Kind: "Authorino"} | ||
DeploymentGroupKind = metav1.SchemeGroupVersion.WithKind("Deployment").GroupKind() | ||
|
||
LimitadorsResource = limitadorv1alpha1.GroupVersion.WithResource("limitadors") | ||
AuthorinosResource = authorinooperatorv1beta1.GroupVersion.WithResource("authorinos") | ||
|
@@ -66,6 +67,34 @@ func LinkKuadrantToAuthorino(objs controller.Store) machinery.LinkFunc { | |
} | ||
} | ||
|
||
func LinkAuthorinoToDeployment(objs controller.Store) machinery.LinkFunc { | ||
authorinos := lo.Map(objs.FilterByGroupKind(AuthorinoGroupKind), controller.ObjectAs[machinery.Object]) | ||
|
||
return machinery.LinkFunc{ | ||
From: AuthorinoGroupKind, | ||
To: DeploymentGroupKind, | ||
Func: func(child machinery.Object) []machinery.Object { | ||
return lo.Filter(authorinos, func(k machinery.Object, _ int) bool { | ||
return k.GetNamespace() == child.GetNamespace() && child.GetName() == "authorino" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not very familiar with these linking functions. I still need to educate myself. Question: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm also new to them, the idea here, which may not be implemented correctly yet is that we link the authorino deployment, I'm uisng the GetName to isolate it, although I'd rather not hardcode, that needs to be fixed so that it's only that one that get's picked up and not all in the authorino namespace. AIUI this is to add it as a child of the Authorino cr in the topology. |
||
}) | ||
}, | ||
} | ||
} | ||
|
||
func LinkLimitadorToDeployment(objs controller.Store) machinery.LinkFunc { | ||
limitadors := lo.Map(objs.FilterByGroupKind(LimitadorGroupKind), controller.ObjectAs[machinery.Object]) | ||
|
||
return machinery.LinkFunc{ | ||
From: LimitadorGroupKind, | ||
To: DeploymentGroupKind, | ||
Func: func(child machinery.Object) []machinery.Object { | ||
return lo.Filter(limitadors, func(k machinery.Object, _ int) bool { | ||
return k.GetNamespace() == child.GetNamespace() && child.GetName() == "limitador" | ||
}) | ||
}, | ||
} | ||
} | ||
|
||
func LinkKuadrantToServiceMonitor(objs controller.Store) machinery.LinkFunc { | ||
kuadrants := lo.Map(objs.FilterByGroupKind(KuadrantGroupKind), controller.ObjectAs[machinery.Object]) | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ apiVersion: kuadrant.io/v1beta1 | |
kind: Kuadrant | ||
metadata: | ||
name: kuadrant-sample | ||
spec: {} | ||
spec: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the sample being shown in operatorhub web console. Do we want to add (optional) mtls config to it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we'd prefer not to i'm fine with that. My reasoning for adding it here is that in the verification steps i'm using |
||
mtls: | ||
enable: false |
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.
At some point can you add a comment to what the mtls struct is for. The comment gets added to the CRD definition as a description. You will also need to run make manifest , bundle and helm at some point.