-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[address #4717] create template/metadata when using includeTemplates if not present #4751
Conversation
Hi @aibarbetta. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@KnVerey @natasha41575 can you review? |
/ok-to-test |
Fix makes sense and regression test is solid. Thank you! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aibarbetta, KnVerey The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
/unhold |
Immediately after allowing this to merge I realized a big problem with it: the fieldspec it is updating is not resource-specific, which was only working correctly because of kind: Service
metadata:
labels:
app: bingo
owner: alice
someName: someValue
name: svc
spec:
template:
metadata:
labels:
app: bingo
owner: alice
someName: someValue which is invalid. We need to be merging complete, resource-specific fieldspecs. I'm going to revert this PR. |
Yeah, that's why The idea would be take all the spec from List of relevant specs- path: metadata/labels
create: true
- path: spec/template/metadata/labels
create: true
version: v1
kind: ReplicationController
- path: spec/template/metadata/labels
create: true
kind: Deployment
- path: spec/template/metadata/labels
create: true
kind: ReplicaSet
- path: spec/template/metadata/labels
create: true
kind: DaemonSet
- path: spec/template/metadata/labels
create: true
group: apps
kind: StatefulSet
- path: spec/volumeClaimTemplates[]/metadata/labels
create: true
group: apps
kind: StatefulSet
- path: spec/template/metadata/labels
create: true
group: batch
kind: Job
- path: spec/jobTemplate/metadata/labels
create: true
group: batch
kind: CronJob
- path: spec/jobTemplate/spec/template/metadata/labels
create: true
group: batch
kind: CronJob I don't really know what would be the best way to sync those two together, or even how to implement a naive copy/paste version, but IMHO the high level of what needs to be done is that. |
Fix #4717