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: bump kubernetes-client and fix deprecated k8s auto-scaler API #984

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/workspaces/infrastructure-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"private": true,
"dependencies": {
"@babel/runtime": "^7.16.0",
"@kubernetes/client-node": "^0.16.3",
"@kubernetes/client-node": "^0.20",
"axios": "0.28.0",
"bluebird": "3.5.5",
"body-parser": "1.20.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: autoscaling/v2beta2
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{name}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ spec:
`;

exports[`deploymentGenerator generates createAutoScaler manifest 1`] = `
"apiVersion: autoscaling/v2beta2
"apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: auto-scaler-name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const API_BASE = config.get('kubernetesApi');

const getAutoScalerUrl = (namespace, name) => {
const nameComponent = name ? `/${name}` : '';
return `${API_BASE}/apis/autoscaling/v2beta2/namespaces/${namespace}/horizontalpodautoscalers${nameComponent}`;
return `${API_BASE}/apis/autoscaling/v2/namespaces/${namespace}/horizontalpodautoscalers${nameComponent}`;
};

const YAML_CONTENT_HEADER = { headers: { 'Content-Type': 'application/yaml' } };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import autoScalerApi from './autoScalerApi';
const mockAxios = new MockAdapter(axios);
const apiBase = config.get('kubernetesApi');
const namespace = 'namespace';
const hpaUrl = `${apiBase}/apis/autoscaling/v2beta2/namespaces/${namespace}/horizontalpodautoscalers`;
const hpaUrl = `${apiBase}/apis/autoscaling/v2/namespaces/${namespace}/horizontalpodautoscalers`;
const hpaName = 'hpa-name';

const hpaResource = {
Expand Down
Loading
Loading