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

Update Dockerfile to use Entrypoint Script to support Cgroupv2 #3237

Closed
wants to merge 4 commits into from

Conversation

iwilltry42
Copy link
Collaborator

Proposed Changes

Fixes usage of containerized k3s on cgroupv2 systems

Types of Changes

  • Entrypoint script for image

Verification

  • build the image
  • run it on a system using cgroupv2 (server)
  • if you don't see an error related to cgroups, then it's working

Linked Issues

Further Comments

Fixes usage of containerized k3s on cgroupv2 systems

Signed-off-by: Thorsten Klein <iwilltry42@gmail.com>
@iwilltry42 iwilltry42 requested a review from a team as a code owner April 27, 2021 10:12
package/entrypoint.sh Outdated Show resolved Hide resolved
@@ -19,5 +20,5 @@ VOLUME /var/lib/cni
VOLUME /var/log
ENV PATH="$PATH:/bin/aux"
ENV CRI_CONFIG_FILE="/var/lib/rancher/k3s/agent/etc/crictl.yaml"
ENTRYPOINT ["/bin/k3s"]
ENTRYPOINT ["/bin/entrypoint.sh"]
Copy link
Contributor

Choose a reason for hiding this comment

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

The logic should be coded in k3s agent, not in a shell script IMHO

Copy link
Contributor

Choose a reason for hiding this comment

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

The logic should be coded in k3s agent, not in a shell script IMHO

Agree

Copy link
Member

Choose a reason for hiding this comment

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

sounds like we're in agreement that this should go into the k3s agent code alongside the other cgroup handling stuff.

Copy link
Collaborator Author

@iwilltry42 iwilltry42 left a comment

Choose a reason for hiding this comment

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

package/entrypoint.sh Outdated Show resolved Hide resolved
package/entrypoint.sh Outdated Show resolved Hide resolved
package/entrypoint.sh Outdated Show resolved Hide resolved
@iwilltry42
Copy link
Collaborator Author

Closing this because there's a better place for this in k3s agent code.
Though just confirming, that it worked just well with the latest k3s image on several tested cgroupv1 and cgroupv2 systems.

@iwilltry42 iwilltry42 closed this Apr 28, 2021
iwilltry42 added a commit to iwilltry42/k3s that referenced this pull request Apr 28, 2021
iwilltry42 added a commit to iwilltry42/k3s that referenced this pull request Apr 28, 2021
iwilltry42 added a commit to k3d-io/k3d that referenced this pull request Apr 28, 2021
iwilltry42 added a commit to iwilltry42/k3s that referenced this pull request Apr 28, 2021
- Ref: see discussion at k3s-io#3237

Signed-off-by: Thorsten Klein <iwilltry42@gmail.com>
iwilltry42 added a commit to iwilltry42/k3s that referenced this pull request May 12, 2021
- Ref: see discussion at k3s-io#3237

Signed-off-by: Thorsten Klein <iwilltry42@gmail.com>
iwilltry42 added a commit to iwilltry42/k3s that referenced this pull request Jul 20, 2021
- Ref: see discussion at k3s-io#3237

Signed-off-by: Thorsten Klein <iwilltry42@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants