Skip to content

fix: high-risk vulnerabilities caused by low version of kustomize#2490

Closed
fengshunli wants to merge 3 commits into
open-policy-agent:masterfrom
fengshunli:kustomize
Closed

fix: high-risk vulnerabilities caused by low version of kustomize#2490
fengshunli wants to merge 3 commits into
open-policy-agent:masterfrom
fengshunli:kustomize

Conversation

@fengshunli
Copy link
Copy Markdown
Contributor

@fengshunli fengshunli commented Jan 4, 2023

upgrade kustomize
image
upgrade yq
image

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 4, 2023

Codecov Report

Base: 53.32% // Head: 53.18% // Decreases project coverage by -0.13% ⚠️

Coverage data is based on head (0f939be) compared to base (a21f595).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2490      +/-   ##
==========================================
- Coverage   53.32%   53.18%   -0.14%     
==========================================
  Files         116      116              
  Lines       10270    10270              
==========================================
- Hits         5476     5462      -14     
- Misses       4373     4383      +10     
- Partials      421      425       +4     
Flag Coverage Δ
unittests 53.18% <ø> (-0.14%) ⬇️

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

Impacted Files Coverage Δ
...onstrainttemplate/constrainttemplate_controller.go 55.50% <0.00%> (-3.35%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

- containerPort: {{ .Values.controllerManager.healthPort }}
name: healthz
protocol: TCP
- containerPort: 8443
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks like these are being duplicated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it is indeed a problem caused by the upgraded version of kustomize

apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
annotations: {{- toYaml .Values.mutatingWebhookAnnotations | trim | nindent 4 }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why are these being removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

run make manifests to automatically delete

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we would want these to be deleted, we might want to check why new kustomize is deleting them

Copy link
Copy Markdown
Contributor Author

@fengshunli fengshunli Jan 6, 2023

Choose a reason for hiding this comment

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

it is indeed a problem caused by the upgraded version of kustomize. I first submitted the pr of yq. I solved the problem of kustomize and submitted it with another branch. This is the pr of yq #2497

apiVersion: v1
kind: Secret
metadata:
annotations: {{- toYaml .Values.secretAnnotations | trim | nindent 4 }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here re: deletion

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it is indeed a problem caused by the upgraded version of kustomize

Copy link
Copy Markdown
Contributor Author

@fengshunli fengshunli Jan 11, 2023

Choose a reason for hiding this comment

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

using version 4 or above, it can be written in such a format, which can solve the problem of missing annotations @sozercan @ ritazh
image

the generated effect display
image

reference link https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/

@fengshunli fengshunli changed the title fix: high-risk vulnerabilities caused by low version of kustomize and yq fix: high-risk vulnerabilities caused by low version of kustomize Jan 6, 2023
@sozercan
Copy link
Copy Markdown
Member

looks like #2518 is a newer pr? @fengshunli please try to work in a single pr so comments don't get lost. I'll close this one for now.

@sozercan sozercan closed this Jan 17, 2023
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.

3 participants