Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NO-JIRA: perfprof: render: make ownerReference optional (#907)
* perfprof: render: make ownerReference optional When we set OwnerReference for dependant object, we must use the object UID the apiserver set. Apiserver owns this field (obviously) so setting it when missing, like the code did in the past, is wrong and will cause conflicts on updates. I the pre-render flow we can't wait for the apiserver to set a UID, so the only possible option is to not set any OwnerReference at all. Signed-off-by: Francesco Romani <fromani@redhat.com> * perfprof: render: add weak owner reference support There are cases on which we can't use the real owner reference in the render flow, because: - we don't own the performanceprofile uid - we can't wait to learn back the apiserver-decided uid because we need to render all the manifest at once. so, to group objects together and enable to safely and easily rebuild the ownerReference graph later, we add an annotation which serves as weaker owner reference, using the profile name and adding it to all the related objects. Note this form of weak reference is meant to serve to a placeholder for the real ownerReference which should be added by the relevant controller later on, when the cluster is started and is running. Signed-off-by: Francesco Romani <fromani@redhat.com> --------- Signed-off-by: Francesco Romani <fromani@redhat.com> (cherry picked from commit 0e31943)
- Loading branch information
Showing
39 changed files
with
638 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...data/render-expected-output/bootstrap/extra-mcp/openshift-bootstrap-master_annotated.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: performance.openshift.io/v2 | ||
kind: PerformanceProfile | ||
metadata: | ||
creationTimestamp: null | ||
name: openshift-bootstrap-master | ||
labels: | ||
performance.openshift.io/weak-owner-reference-name: "openshift-bootstrap-master" | ||
spec: | ||
cpu: | ||
isolated: 0-1 | ||
reserved: 2-7 | ||
machineConfigPoolSelector: | ||
pools.operator.machineconfiguration.openshift.io/master: "" | ||
nodeSelector: | ||
node-role.kubernetes.io/master: "" | ||
status: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...data/render-expected-output/bootstrap/extra-mcp/openshift-bootstrap-worker_annotated.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: performance.openshift.io/v2 | ||
kind: PerformanceProfile | ||
metadata: | ||
creationTimestamp: null | ||
name: openshift-bootstrap-worker | ||
labels: | ||
performance.openshift.io/weak-owner-reference-name: "openshift-bootstrap-worker" | ||
spec: | ||
cpu: | ||
isolated: 0-1 | ||
reserved: 2-3 | ||
machineConfigPoolSelector: | ||
pools.operator.machineconfiguration.openshift.io/worker: "" | ||
nodeSelector: | ||
node-role.kubernetes.io/worker: "" | ||
status: {} |
Oops, something went wrong.