Repository navigation
apiVersion shouldn't be hardcoded - #5060
Conversation
| {{- define "cronjob.apiVersion" -}} | ||
| {{- if semverCompare "< 1.8" .Capabilities.KubeVersion.GitVersion -}} | ||
| {{- print "batch/v2alpha1" }} | ||
| {{- else if semverCompare ">=1.8" .Capabilities.KubeVersion.GitVersion -}} |
There was a problem hiding this comment.
Can you add a -0 to the end of the comparison (e.g. >=1.8-0). This will cause the semver comparison to evaluate pre-releases. Unfortunately, some of the distros use pre-releases to specify their version which can cause comparison breakages. Pre-releases, as defined by semver, are prior to the release, lower in order, and may not satisfy the releases API which is why they are ignored by default.
You can find another PR that does this as an example at #4605
|
/ok-to-test |
We had this discussion before this PR was merged so that's why the cronjob api version was removed. Other than that PR looks good /ok-to-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DStorck, gianrubio The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…into rabbitmq-workload-api-fix * 'rabbitmq-workload-api-fix' of github.com:goruha/charts: (75 commits) [stable/odoo] Add carrodher as owner (helm#4856) [stable/jasperreports] Release 1.0.3 (helm#5107) Add doc about redis data only persistence (helm#4965) [sentry] add nodeSelector, affinity & tolerations (helm#4264) [stable/sonarqube] Adding support for Service annotations (helm#4060) [incubator/schema-registry] Updating GroupID, and moving to using kafka coordinator master election (helm#5019) quote boolean S3 environment variables (helm#5066) Fix graceful shutdown of brokers, more settings, version bump (helm#5082) apiVersion shouldn't be hardcoded (helm#5060) [stable/phabricator] Release 1.0.4 (helm#5068) [stable/testlink] Release 1.0.5 (helm#5050) [stable/redis] fixed a typo into NOTES (helm#5070) [etcd-operator] readiness/liveness checks for operator (helm#4609) Annotations and checksum (helm#5067) Add OWNERS file to schema-registry (helm#5054) [stable/mongodb-replicaset] Use security context on pod level (helm#5055) Typo fix in sonarqube/README.md (helm#5045) Typo fix in sonatype-nexus/README.md (helm#5042) [sonarqube] nodeSelector, affinity & tolerations. also separate resoruces for plugin pod (helm#4265) [stable/sonarqube] upgrade to LTS version (6.7.3) (helm#5029) ...
* apiVersion shouldn't be hardcoded * updated chart version * fixed semver comparison
* apiVersion shouldn't be hardcoded * updated chart version * fixed semver comparison Signed-off-by: voron <[email protected]>
What this PR does / why we need it:
Cronjobs have different api versions for kubernetes versions < 1.8, so it shouldn't be hardcoded into the chart. This PR :