Skip to content
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

Stop recording annotations set to false #16889

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Dec 19, 2022

False is the assumed value, and inspect and podman generate kube are being cluttered with a ton of annotations that indicate nothing.

Signed-off-by: Daniel J Walsh [email protected]

Does this PR introduce a user-facing change?

podman container inspect and podman kube generate will no longer list default annotations set to false.

False is the assumed value, and inspect and podman generate kube are
being cluttered with a ton of annotations that indicate nothing.

Signed-off-by: Daniel J Walsh <[email protected]>
@openshift-ci openshift-ci bot added do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note and removed do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None labels Dec 19, 2022
@rhatdan
Copy link
Member Author

rhatdan commented Dec 19, 2022

Gives cleaner looking kube.yaml.

./bin/podman create --name dan --replace fedora echo hi
./bin/podman generate kube dan
# Save the output of this file and use kubectl create -f to import
# it into Kubernetes.
#
# Created with podman-4.4.0-dev
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: "2022-12-19T21:10:01Z"
  labels:
    app: dan-pod
  name: dan-pod
spec:
  containers:
  - command:
    - echo
    - hi
    env:
    - name: QEMU_CPU
      value: max
    image: registry.fedoraproject.org/fedora:latest
    name: dan

Versus

/bin/podman create --name dan --replace fedora echo hi
$ /bin/podman generate kube dan
# Save the output of this file and use kubectl create -f to import
# it into Kubernetes.
#
# Created with podman-4.3.1
apiVersion: v1
kind: Pod
metadata:
  annotations:
    io.kubernetes.cri-o.TTY/dan: "false"
    io.podman.annotations.autoremove/dan: "FALSE"
    io.podman.annotations.init/dan: "FALSE"
    io.podman.annotations.privileged/dan: "FALSE"
    io.podman.annotations.publish-all/dan: "FALSE"
  creationTimestamp: "2022-12-19T21:11:51Z"
  labels:
    app: dan-pod
  name: dan-pod
spec:
  automountServiceAccountToken: false
  containers:
  - command:
    - echo
    - hi
    env:
    - name: QEMU_CPU
      value: max
    image: registry.fedoraproject.org/fedora:latest
    name: dan
    securityContext:
      capabilities:
        drop:
        - CAP_MKNOD
        - CAP_NET_RAW
        - CAP_AUDIT_WRITE
  enableServiceLinks: false

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
@containers/podman-maintainers PTAL

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 20, 2022
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 20, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 20, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, rhatdan

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@umohnani8
Copy link
Member

LGTM
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 20, 2022
@openshift-merge-robot openshift-merge-robot merged commit 56982a9 into containers:main Dec 20, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants