-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #505 from alexander-demicev/etcdsnapshotrestoreapi
Add ETCD Snapshot and Restore API skeleton
- Loading branch information
Showing
16 changed files
with
701 additions
and
1 deletion.
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
123 changes: 123 additions & 0 deletions
123
charts/rancher-turtles/templates/rancher-turtles-exp-etcdrestore-components.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,123 @@ | ||
{{- if index .Values "rancherTurtles" "features" "etcd-snapshot-restore" "enabled" }} | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.14.0 | ||
name: etcdmachinesnapshots.turtles-capi.cattle.io | ||
spec: | ||
group: turtles-capi.cattle.io | ||
names: | ||
kind: EtcdMachineSnapshot | ||
listKind: EtcdMachineSnapshotList | ||
plural: etcdmachinesnapshots | ||
singular: etcdmachinesnapshot | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: EtcdMachineSnapshot is the Schema for the EtcdMachineSnapshot | ||
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: EtcdMachineSnapshotSpec defines the desired state of EtcdMachineSnapshot. | ||
properties: | ||
foo: | ||
type: string | ||
required: | ||
- foo | ||
type: object | ||
status: | ||
default: {} | ||
description: EtcdMachineSnapshotStatus defines observed state of EtcdMachineSnapshot. | ||
properties: | ||
bar: | ||
type: string | ||
required: | ||
- bar | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.14.0 | ||
name: etcdsnapshotrestores.turtles-capi.cattle.io | ||
spec: | ||
group: turtles-capi.cattle.io | ||
names: | ||
kind: EtcdSnapshotRestore | ||
listKind: EtcdSnapshotRestoreList | ||
plural: etcdsnapshotrestores | ||
singular: etcdsnapshotrestore | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: EtcdSnapshotRestore is the schema for the EtcdSnapshotRestore | ||
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: EtcdSnapshotRestoreSpec defines the desired state of EtcdSnapshotRestore. | ||
properties: | ||
foo: | ||
type: string | ||
required: | ||
- foo | ||
type: object | ||
status: | ||
default: {} | ||
description: EtcdSnapshotRestoreStatus defines observed state of EtcdSnapshotRestore. | ||
properties: | ||
bar: | ||
type: string | ||
required: | ||
- bar | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
{{- end }} |
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
60 changes: 60 additions & 0 deletions
60
config/exp/etcdrestore/crd/bases/turtles-capi.cattle.io_etcdmachinesnapshots.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,60 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.14.0 | ||
name: etcdmachinesnapshots.turtles-capi.cattle.io | ||
spec: | ||
group: turtles-capi.cattle.io | ||
names: | ||
kind: EtcdMachineSnapshot | ||
listKind: EtcdMachineSnapshotList | ||
plural: etcdmachinesnapshots | ||
singular: etcdmachinesnapshot | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: EtcdMachineSnapshot is the Schema for the EtcdMachineSnapshot | ||
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: EtcdMachineSnapshotSpec defines the desired state of EtcdMachineSnapshot. | ||
properties: | ||
foo: | ||
type: string | ||
required: | ||
- foo | ||
type: object | ||
status: | ||
description: EtcdMachineSnapshotStatus defines observed state of EtcdMachineSnapshot. | ||
properties: | ||
bar: | ||
type: string | ||
required: | ||
- bar | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
60 changes: 60 additions & 0 deletions
60
config/exp/etcdrestore/crd/bases/turtles-capi.cattle.io_etcdsnapshotrestores.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,60 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.14.0 | ||
name: etcdsnapshotrestores.turtles-capi.cattle.io | ||
spec: | ||
group: turtles-capi.cattle.io | ||
names: | ||
kind: EtcdSnapshotRestore | ||
listKind: EtcdSnapshotRestoreList | ||
plural: etcdsnapshotrestores | ||
singular: etcdsnapshotrestore | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: EtcdSnapshotRestore is the schema for the EtcdSnapshotRestore | ||
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: EtcdSnapshotRestoreSpec defines the desired state of EtcdSnapshotRestore. | ||
properties: | ||
foo: | ||
type: string | ||
required: | ||
- foo | ||
type: object | ||
status: | ||
description: EtcdSnapshotRestoreStatus defines observed state of EtcdSnapshotRestore. | ||
properties: | ||
bar: | ||
type: string | ||
required: | ||
- bar | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
3 changes: 3 additions & 0 deletions
3
config/exp/etcdrestore/crd/patches/turtles-capi.cattle.io_etcdmachinesnapshots.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,3 @@ | ||
- op: add | ||
path: /spec/versions/0/schema/openAPIV3Schema/properties/status/default | ||
value: {} |
3 changes: 3 additions & 0 deletions
3
config/exp/etcdrestore/crd/patches/turtles-capi.cattle.io_etcdsnapshotrestores.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,3 @@ | ||
- op: add | ||
path: /spec/versions/0/schema/openAPIV3Schema/properties/status/default | ||
value: {} |
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,35 @@ | ||
# This kustomization.yaml is not intended to be run by itself, | ||
# since it depends on service name and namespace that are out of this kustomize package. | ||
# It should be run by config/default | ||
resources: | ||
- crd/bases/turtles-capi.cattle.io_etcdmachinesnapshots.yaml | ||
- crd/bases/turtles-capi.cattle.io_etcdsnapshotrestores.yaml | ||
#+kubebuilder:scaffold:crdkustomizeresource | ||
|
||
patches: | ||
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. | ||
# patches here are for enabling the conversion webhook for each CRD | ||
- target: | ||
group: apiextensions.k8s.io | ||
version: v1 | ||
kind: CustomResourceDefinition | ||
name: etcdmachinesnapshots.turtles-capi.cattle.io | ||
path: crd/patches/turtles-capi.cattle.io_etcdmachinesnapshots.yaml | ||
- target: | ||
group: apiextensions.k8s.io | ||
version: v1 | ||
kind: CustomResourceDefinition | ||
name: etcdsnapshotrestores.turtles-capi.cattle.io | ||
path: crd/patches/turtles-capi.cattle.io_etcdsnapshotrestores.yaml | ||
#+kubebuilder:scaffold:crdkustomizewebhookpatch | ||
|
||
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix. | ||
# patches here are for enabling the CA injection for each CRD | ||
#- path: patches/cainjection_in_capiproviders.yaml | ||
#+kubebuilder:scaffold:crdkustomizecainjectionpatch | ||
|
||
# [WEBHOOK] To enable webhook, uncomment the following section | ||
# the following config is for teaching kustomize how to do kustomization for CRDs. | ||
|
||
configurations: | ||
- kustomizeconfig.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,19 @@ | ||
# This file is for teaching kustomize how to substitute name and namespace reference in CRD | ||
nameReference: | ||
- kind: Service | ||
version: v1 | ||
fieldSpecs: | ||
- kind: CustomResourceDefinition | ||
version: v1 | ||
group: apiextensions.k8s.io | ||
path: spec/conversion/webhook/clientConfig/service/name | ||
|
||
namespace: | ||
- kind: CustomResourceDefinition | ||
version: v1 | ||
group: apiextensions.k8s.io | ||
path: spec/conversion/webhook/clientConfig/service/namespace | ||
create: false | ||
|
||
varReference: | ||
- path: metadata/annotations |
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,3 @@ | ||
# Experimental(Technical Preview) | ||
|
||
This is a technical preview of the experimental features that are currently being developed in the project. These features are not yet ready for production use and are subject to change. |
Oops, something went wrong.