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

feat: add hostPID for linux daemonset container #449

Merged

Conversation

jamesalford
Copy link
Contributor

@jamesalford jamesalford commented Jun 4, 2024

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind test
/kind failing-test
/kind flake

/kind feature

What this PR does / why we need it:
Adds the ability to add hostPID to the container spec for linux daemonset. This is used to execute scripts in init containers that modify the host storage

~/go/src/github.com/kubernetes-sigs/sig-storage-local-static-provisioner/helm# ../hack/update-generated.sh
*** IMPORTANT NOTE ***
This script is used to update generated yaml files from helm values
automatically. It does not validate generated yaml files. Please check to make
sure generated files are what you expected.
*** IMPORTANT NOTE ***
====== HELM v3 ========
Generating with helm v3.10.1 generated_examples/additional-volumes.yaml from examples/additional-volumes.yaml
Generating with helm v3.10.1 generated_examples/baremetal-affinity.yaml from examples/baremetal-affinity.yaml
Generating with helm v3.10.1 generated_examples/baremetal-cleanbyjobs.yaml from examples/baremetal-cleanbyjobs.yaml
Generating with helm v3.10.1 generated_examples/baremetal-default-storage.yaml from examples/baremetal-default-storage.yaml
Generating with helm v3.10.1 generated_examples/baremetal-nodeselector.yaml from examples/baremetal-nodeselector.yaml
Generating with helm v3.10.1 generated_examples/baremetal-priority-critical.yaml from examples/baremetal-priority-critical.yaml
Generating with helm v3.10.1 generated_examples/baremetal-priority-noncritical.yaml from examples/baremetal-priority-noncritical.yaml
Generating with helm v3.10.1 generated_examples/baremetal-prometheus.yaml from examples/baremetal-prometheus.yaml
Generating with helm v3.10.1 generated_examples/baremetal-provisioner.yaml from examples/baremetal-provisioner.yaml
Generating with helm v3.10.1 generated_examples/baremetal-resyncperiod.yaml from examples/baremetal-resyncperiod.yaml
Generating with helm v3.10.1 generated_examples/baremetal-tolerations.yaml from examples/baremetal-tolerations.yaml
Generating with helm v3.10.1 generated_examples/baremetal-without-rbac.yaml from examples/baremetal-without-rbac.yaml
Generating with helm v3.10.1 generated_examples/baremetal-with-resource-limits.yaml from examples/baremetal-with-resource-limits.yaml
Generating with helm v3.10.1 generated_examples/baremetal.yaml from examples/baremetal.yaml
Generating with helm v3.10.1 generated_examples/development-gce.yaml from examples/development-gce.yaml
Generating with helm v3.10.1 generated_examples/development-gke.yaml from examples/development-gke.yaml
Generating with helm v3.10.1 generated_examples/eks-nvme-ssd.yaml from examples/eks-nvme-ssd.yaml
Generating with helm v3.10.1 generated_examples/gce-retain.yaml from examples/gce-retain.yaml
Generating with helm v3.10.1 generated_examples/gce.yaml from examples/gce.yaml
Generating with helm v3.10.1 generated_examples/gke-nvme-ssd-block-raid.yaml from examples/gke-nvme-ssd-block-raid.yaml
Generating with helm v3.10.1 generated_examples/gke.yaml from examples/gke.yaml
Done.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Release note:

none

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 4, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @jamesalford. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 4, 2024
@k8s-ci-robot k8s-ci-robot requested review from andyzhangx and cofyc June 4, 2024 11:07
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 4, 2024
Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 18, 2024
@andyzhangx
Copy link
Member

@jamesalford can you fix the error, you need to make changes in examples/additional-volumes.yaml

==== HELM v3====
Checking examples/additional-volumes.yaml failed, diff: 
attachment
--- generated_examples/additional-volumes.yaml	2024-07-18 06:27:38.970631925 +0000
+++ /tmp/tmp.iFYEKeDvEe	2024-07-18 06:34:24.406931414 +0000
@@ -104,6 +104,7 @@
       annotations:
         checksum/config: 997271ac2c9e49ae617e255f4d6e709709aa662e1049fef537e81f1b4d6b36a9
     spec:
+      hostPID: false
       serviceAccountName: local-static-provisioner
       nodeSelector:
         kubernetes.io/os: linux
make: *** [Makefile:48: verify] Error 1

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 8, 2024
@andyzhangx andyzhangx force-pushed the feature/linux_hostPID branch from 89735b3 to 33cda76 Compare December 30, 2024 02:27
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 30, 2024
@andyzhangx andyzhangx changed the title Add hostPID for linux daemonset container feat: add hostPID for linux daemonset container Dec 30, 2024
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 30, 2024
Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 30, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, jamesalford

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 30, 2024
@k8s-ci-robot k8s-ci-robot merged commit 75b8f86 into kubernetes-sigs:master Dec 30, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants