-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove old CRD stored versions when upgrading (#71)
* If upgrading CRD has different versions than the ones stored on the server, remove the previously stored versions as stored versions * Support older github workflow for now which is missing chartVersion from the pkg download
- Loading branch information
Showing
6 changed files
with
431 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
testfiles/crd-upgrader/multiversion-clientconfig-mockup-both.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.14.0 | ||
name: clientconfigmocks.config.k8ssandra.io | ||
spec: | ||
group: config.k8ssandra.io | ||
names: | ||
kind: ClientConfigMock | ||
listKind: ClientConfigMockList | ||
plural: clientconfigmocks | ||
singular: clientconfigmock | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: ClientConfig is the Schema for the kubeconfigs API | ||
properties: | ||
apiVersion: | ||
description: |- | ||
APIVersion defines the versioned schema of this representation of an object. | ||
Servers should convert recognized schemas to the latest internal value, and | ||
may reject unrecognized values. | ||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
type: string | ||
kind: | ||
description: |- | ||
Kind is a string value representing the REST resource this object represents. | ||
Servers may infer this from the endpoint the client submits requests to. | ||
Cannot be updated. | ||
In CamelCase. | ||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: ClientConfigSpec defines the desired state of KubeConfig | ||
properties: | ||
kubeConfigSecret: | ||
description: |- | ||
KubeConfigSecret should reference an existing secret; the actual configuration will be read from | ||
this secret's "kubeconfig" key. | ||
properties: | ||
name: | ||
description: |- | ||
Name of the referent. | ||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | ||
TODO: Add other useful fields. apiVersion, kind, uid? | ||
type: string | ||
type: object | ||
x-kubernetes-map-type: atomic | ||
type: object | ||
type: object | ||
served: true | ||
storage: false | ||
- name: v1beta1 | ||
schema: | ||
openAPIV3Schema: | ||
description: ClientConfig is the Schema for the kubeconfigs API | ||
properties: | ||
apiVersion: | ||
description: |- | ||
APIVersion defines the versioned schema of this representation of an object. | ||
Servers should convert recognized schemas to the latest internal value, and | ||
may reject unrecognized values. | ||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
type: string | ||
kind: | ||
description: |- | ||
Kind is a string value representing the REST resource this object represents. | ||
Servers may infer this from the endpoint the client submits requests to. | ||
Cannot be updated. | ||
In CamelCase. | ||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: ClientConfigSpec defines the desired state of KubeConfig | ||
properties: | ||
contextName: | ||
description: ContextName allows to override the object name for context-name. | ||
If not set, the ClientConfig.Name is used as context name | ||
type: string | ||
kubeConfigSecret: | ||
description: |- | ||
KubeConfigSecret should reference an existing secret; the actual configuration will be read from | ||
this secret's "kubeconfig" key. | ||
properties: | ||
name: | ||
description: |- | ||
Name of the referent. | ||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | ||
TODO: Add other useful fields. apiVersion, kind, uid? | ||
type: string | ||
type: object | ||
x-kubernetes-map-type: atomic | ||
type: object | ||
type: object | ||
served: true | ||
storage: true |
Oops, something went wrong.