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

[Fix] Index overshoot #1413

Closed
wants to merge 1 commit into from
Closed

[Fix] Index overshoot #1413

wants to merge 1 commit into from

Conversation

ls-2018
Copy link
Member

@ls-2018 ls-2018 commented Sep 12, 2023

When I try to manually specify a key in configmap, the controller panics

image
apiVersion: v1
kind: Pod
metadata:
  name: test
spec:
  containers:
    - name: main
      image: centos:7
      command:
        - "/bin/sh"
        - "-c"
        - "sleep 1d"
    - name: sidecar
      image: centos:7
      command:
        - "/bin/sh"
        - "-c"
        - "sleep 1d"
      env:
        - name: KRUISE_CONTAINER_PRIORITY
          value: "1"
        - name: KRUISE_CONTAINER_BARRIER
          valueFrom:
            configMapKeyRef:
              name: x
              key: "p"
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: x
data:
  p: "1"

@ls-2018
Copy link
Member Author

ls-2018 commented Sep 12, 2023

/assign @zmberg

@kruise-bot kruise-bot added the size/XS size/XS: 0-9 label Sep 12, 2023
Signed-off-by: 刘硕 <liushuo@zetyun.com>
@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from zmberg by writing /assign @zmberg in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@zmberg
Copy link
Member

zmberg commented Sep 13, 2023

@ls-2018 Shouldn't the user be allowed to configure KRUISE_CONTAINER_BARRIER themselves, and if they do, it should be overridden by the kruise webhook?
image

@ls-2018
Copy link
Member Author

ls-2018 commented Sep 13, 2023

@zmberg I don't think we need to expose this to the user. The user just needs to operate KRUISE_CONTAINER_PRIORITY.

If the user sets KRUISE_CONTAINER_BARRIER, I personally feel that it is better to override the env, after all, this is a very special.

Copy link

stale bot commented Dec 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 12, 2023
@stale stale bot closed this Dec 20, 2023
@zmberg zmberg reopened this Dec 20, 2023
@stale stale bot removed the wontfix This will not be worked on label Dec 20, 2023
@kruise-bot
Copy link

@ls-2018: PR needs rebase.

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.

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.45%. Comparing base (a46e941) to head (d2be8ec).
Report is 75 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1413      +/-   ##
==========================================
+ Coverage   48.23%   48.45%   +0.21%     
==========================================
  Files         153      157       +4     
  Lines       21492    22724    +1232     
==========================================
+ Hits        10367    11010     +643     
- Misses       9985    10545     +560     
- Partials     1140     1169      +29     
Flag Coverage Δ
unittests 48.45% <ø> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

stale bot commented Apr 24, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Apr 24, 2024
@stale stale bot closed this May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase size/XS size/XS: 0-9 wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants