Skip to content

Commit

Permalink
fix: Update k8s api version (#4190)
Browse files Browse the repository at this point in the history
Signed-off-by: harrisonliu5 <harrisonliu@kubesphere.io>
  • Loading branch information
harrisonliu5 committed Sep 4, 2023
1 parent 3324c1c commit 8fb5136
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ export const API_VERSIONS = {
statefulsets: 'apis/apps/v1',
daemonsets: 'apis/apps/v1',
jobs: 'apis/batch/v1',
cronjobs: 'apis/batch/v1beta1',
cronjobs: 'apis/batch/v1',
pods: 'api/v1',
namespaces: 'api/v1',
services: 'api/v1',
Expand All @@ -984,7 +984,7 @@ export const API_VERSIONS = {
applications: 'apis/app.k8s.io/v1beta1',
strategies: 'apis/servicemesh.kubesphere.io/v1alpha2',
servicepolicies: 'apis/servicemesh.kubesphere.io/v1alpha2',
horizontalpodautoscalers: 'apis/autoscaling/v2beta2',
horizontalpodautoscalers: 'apis/autoscaling/v2',
customresourcedefinitions: 'apis/apiextensions.k8s.io/v1',
clusters: 'apis/cluster.kubesphere.io/v1alpha1',
workspaces: 'apis/tenant.kubesphere.io/v1alpha2',
Expand Down
4 changes: 2 additions & 2 deletions src/utils/form.templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const getJobTemplate = ({ namespace }) => ({
})

const getCronJobTemplate = ({ namespace }) => ({
apiVersion: 'batch/v1beta1',
apiVersion: 'batch/v1',
kind: 'CronJob',
metadata: {
namespace,
Expand Down Expand Up @@ -287,7 +287,7 @@ const getSecretTemplate = ({ namespace }) => ({
})

const getHorizontalPodAutoscalerTemplate = ({ name, namespace, target }) => ({
apiVersion: 'autoscaling/v2beta2',
apiVersion: 'autoscaling/v2',
kind: 'HorizontalPodAutoscaler',
metadata: {
name,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/workload.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const getHpaFormattedData = (formData = {}) => {
: []

const data = merge(formData, {
apiVersion: 'autoscaling/v2beta2',
apiVersion: 'autoscaling/v2',
kind: 'HorizontalPodAutoscaler',
metadata: {
annotations: {
Expand Down

0 comments on commit 8fb5136

Please sign in to comment.