-
Notifications
You must be signed in to change notification settings - Fork 911
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
Add standard Crossplane package labels to objects. #5536
base: master
Are you sure you want to change the base?
Changes from all commits
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 |
---|---|---|
|
@@ -159,6 +159,7 @@ func (b *RuntimeManifestBuilder) ServiceAccount(overrides ...ServiceAccountOverr | |
|
||
// Overrides that we are opinionated about. | ||
ServiceAccountWithNamespace(b.namespace), | ||
ServiceAccountWithLabels(b.podSelectors()), | ||
ServiceAccountWithOwnerReferences([]metav1.OwnerReference{meta.AsController(meta.TypedReferenceTo(b.revision, b.revision.GetObjectKind().GroupVersionKind()))}), | ||
ServiceAccountWithAdditionalPullSecrets(append(b.revision.GetPackagePullSecrets(), b.serviceAccountPullSecrets...)), | ||
) | ||
|
@@ -194,6 +195,7 @@ func (b *RuntimeManifestBuilder) Deployment(serviceAccount string, overrides ... | |
// Optional defaults, will be used only if the runtime config does not | ||
// specify them. | ||
DeploymentWithOptionalName(b.revision.GetName()), | ||
DeploymentWithLabels(b.podSelectors()), | ||
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. Not sure if adding it as an override is a good option. Other option is to add it in the runtime pre/post hook. 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 not sure either. @turkenh introduced this pattern, so I'm sure he can provide guidance. |
||
DeploymentWithOptionalReplicas(1), | ||
DeploymentWithOptionalPodSecurityContext(&corev1.PodSecurityContext{ | ||
RunAsNonRoot: &runAsNonRoot, | ||
|
@@ -270,6 +272,7 @@ func (b *RuntimeManifestBuilder) Service(overrides ...ServiceOverride) *corev1.S | |
// Overrides that we are opinionated about. | ||
ServiceWithNamespace(b.namespace), | ||
ServiceWithOwnerReferences([]metav1.OwnerReference{meta.AsController(meta.TypedReferenceTo(b.revision, b.revision.GetObjectKind().GroupVersionKind()))}), | ||
ServiceWithLabels(b.podSelectors()), | ||
ServiceWithSelectors(b.podSelectors()), | ||
ServiceWithAdditionalPorts([]corev1.ServicePort{ | ||
{ | ||
|
@@ -300,6 +303,7 @@ func (b *RuntimeManifestBuilder) TLSClientSecret() *corev1.Secret { | |
ObjectMeta: metav1.ObjectMeta{ | ||
Name: *b.revision.GetTLSClientSecretName(), | ||
Namespace: b.namespace, | ||
Labels: b.podSelectors(), | ||
OwnerReferences: []metav1.OwnerReference{meta.AsController(meta.TypedReferenceTo(b.revision, b.revision.GetObjectKind().GroupVersionKind()))}, | ||
}, | ||
} | ||
|
@@ -315,6 +319,7 @@ func (b *RuntimeManifestBuilder) TLSServerSecret() *corev1.Secret { | |
ObjectMeta: metav1.ObjectMeta{ | ||
Name: *b.revision.GetTLSServerSecretName(), | ||
Namespace: b.namespace, | ||
Labels: b.podSelectors(), | ||
OwnerReferences: []metav1.OwnerReference{meta.AsController(meta.TypedReferenceTo(b.revision, b.revision.GetObjectKind().GroupVersionKind()))}, | ||
}, | ||
} | ||
|
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.
Perhaps we should rename
podSelectors
if we're now using it to do more than select pods.