Skip to content

Commit

Permalink
Merge pull request #7801 from jhadvig/bz1915176
Browse files Browse the repository at this point in the history
Bug 1915176: Update snapshot API CRDs to v1 in web-console when creating volumesnapshot related resource
  • Loading branch information
openshift-merge-robot committed Feb 4, 2021
2 parents f6cf402 + ee57df9 commit ca15174
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
Expand Up @@ -74,7 +74,7 @@ export const PVC = {
};

export const SnapshotClass = {
apiVersion: 'snapshot.storage.k8s.io/v1beta1',
apiVersion: 'snapshot.storage.k8s.io/v1',
kind: 'VolumeSnapshotClass',
metadata: {
name: 'csi-hostpath-snapclass',
Expand Down
Expand Up @@ -64,17 +64,17 @@ describe('Kubernetes resource CRUD operations', () => {
.set('horizontalpodautoscalers', { kind: 'HorizontalPodAutoscaler', humanizeKind: false })
.set('networkpolicies', { kind: 'NetworkPolicy', humanizeKind: false })
.set('roles', { kind: 'Role', testI18n: false })
.set('snapshot.storage.k8s.io~v1beta1~VolumeSnapshot', {
kind: 'snapshot.storage.k8s.io~v1beta1~VolumeSnapshot',
.set('snapshot.storage.k8s.io~v1~VolumeSnapshot', {
kind: 'snapshot.storage.k8s.io~v1~VolumeSnapshot',
testI18n: false,
})
.set('snapshot.storage.k8s.io~v1beta1~VolumeSnapshotClass', {
kind: 'snapshot.storage.k8s.io~v1beta1~VolumeSnapshotClass',
.set('snapshot.storage.k8s.io~v1~VolumeSnapshotClass', {
kind: 'snapshot.storage.k8s.io~v1~VolumeSnapshotClass',
namespaced: false,
testI18n: false,
})
.set('snapshot.storage.k8s.io~v1beta1~VolumeSnapshotContent', {
kind: 'snapshot.storage.k8s.io~v1beta1~VolumeSnapshotContent',
.set('snapshot.storage.k8s.io~v1~VolumeSnapshotContent', {
kind: 'snapshot.storage.k8s.io~v1~VolumeSnapshotContent',
namespaced: false,
testI18n: false,
});
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('Kubernetes resource CRUD operations', () => {
'StorageClass',
'Route',
'PersistentVolumeClaim',
'snapshot.storage.k8s.io~v1beta1~VolumeSnapshot',
'snapshot.storage.k8s.io~v1~VolumeSnapshot',
]);

testObjs.forEach(
Expand Down
Expand Up @@ -50,7 +50,7 @@ if (Cypress.env('BRIDGE_AWS')) {
modal.submit();
cy.location('pathname').should(
'include',
`snapshot.storage.k8s.io~v1beta1~VolumeSnapshot/${PVC.metadata.name}-snapshot`,
`snapshot.storage.k8s.io~v1~VolumeSnapshot/${PVC.metadata.name}-snapshot`,
);
detailsPage.titleShouldContain(PVC.metadata.name);
resourceStatusShouldContain('Ready', { timeout: 40000 });
Expand Down
6 changes: 3 additions & 3 deletions frontend/public/models/index.ts
Expand Up @@ -1282,7 +1282,7 @@ export const VolumeSnapshotModel: K8sKind = {
label: 'VolumeSnapshot',
// t('public~VolumeSnapshot')
labelKey: 'public~VolumeSnapshot',
apiVersion: 'v1beta1',
apiVersion: 'v1',
apiGroup: 'snapshot.storage.k8s.io',
plural: 'volumesnapshots',
abbr: 'VS',
Expand All @@ -1299,7 +1299,7 @@ export const VolumeSnapshotClassModel: K8sKind = {
label: 'VolumeSnapshotClass',
// t('public~VolumeSnapshotClass')
labelKey: 'public~VolumeSnapshotClass',
apiVersion: 'v1beta1',
apiVersion: 'v1',
apiGroup: 'snapshot.storage.k8s.io',
plural: 'volumesnapshotclasses',
abbr: 'VSC',
Expand All @@ -1316,7 +1316,7 @@ export const VolumeSnapshotContentModel: K8sKind = {
label: 'VolumeSnapshotContent',
// t('public~VolumeSnapshotContent')
labelKey: 'public~VolumeSnapshotContent',
apiVersion: 'v1beta1',
apiVersion: 'v1',
apiGroup: 'snapshot.storage.k8s.io',
plural: 'volumesnapshotcontents',
abbr: 'VSC',
Expand Down
6 changes: 3 additions & 3 deletions frontend/public/models/yaml-templates.ts
Expand Up @@ -1325,7 +1325,7 @@ spec:
.setIn(
[referenceForModel(k8sModels.VolumeSnapshotModel), 'default'],
`
apiVersion: snapshot.storage.k8s.io/v1beta1
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
name: example-snap
Expand All @@ -1338,7 +1338,7 @@ spec:
.setIn(
[referenceForModel(k8sModels.VolumeSnapshotClassModel), 'default'],
`
apiVersion: snapshot.storage.k8s.io/v1beta1
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: example-snapclass
Expand All @@ -1349,7 +1349,7 @@ deletionPolicy: Delete
.setIn(
[referenceForModel(k8sModels.VolumeSnapshotContentModel), 'default'],
`
apiVersion: snapshot.storage.k8s.io/v1beta1
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotContent
metadata:
name: example-snapcontent
Expand Down

0 comments on commit ca15174

Please sign in to comment.