-
Notifications
You must be signed in to change notification settings - Fork 12
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
Different versions of K8S support different cronjob versions and policy version #116
base: main
Are you sure you want to change the base?
Conversation
ac670df
to
029f9e8
Compare
@@ -1,8 +1,12 @@ | |||
{{- if .Values.enableAuditApiserver }} | |||
{{- $policyVersion := default "v1beta1" -}} | |||
{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.GitVersion -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What version does "semverCompare" represent?
if it represent the version of kubernetes, i can not understand the "semver" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has these code been tested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has these code been tested?
Yes, there are test result images above it
apiVersion: batch/v1 | ||
{{- else if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: batch/v1beta1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any other diff with "v1beta1" and "v1" of CronJob?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any other diff with "v1beta1" and "v1" of CronJob?
From k8s 1.19 to 1.29, there are only v1beta1 and v1
README-zh_CN.md
Outdated
@@ -56,6 +56,7 @@ Lunettes 可以识别容器生命周期每个交付阶段的开始和结尾, | |||
# install lunettes | |||
# 该过程开启apiserver的审计功能,apiserver会发生重启 | |||
helm upgrade --install lunettes oci://registry-1.docker.io/lunettes/lunettes-chart --version [version] | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove useless blank lines to avoid conflicts with other pr merges
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove useless blank lines to avoid conflicts with other pr merges
done
docs/quick_start.md
Outdated
@@ -25,7 +25,7 @@ Note: Beginning in Helm v3.8.0, OCI support is enabled by default, and it gradua | |||
|
|||
```bash | |||
helm upgrade --install lunettes oci://registry-1.docker.io/lunettes/lunettes-chart --version [version] | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove useless blank lines to avoid conflicts with other pr merges
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove useless blank lines to avoid conflicts with other pr merges
done
@@ -1,4 +1,8 @@ | |||
{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.GitVersion -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the same method here as in the previous policyversion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the same method here as in the previous policyversion?
Directly using nested yaml files will result in an error and requires passing variables
@@ -1,8 +1,12 @@ | |||
{{- if .Values.enableAuditApiserver }} | |||
{{- $policyVersion := default "v1beta1" -}} | |||
{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.GitVersion -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has these code been tested?
029f9e8
to
6e3551b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
if kubernetes version < 1.21 and >1.19,cronjob and policy version should be batch/v1beta1