-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The CloudInit CRD allows for k8s-native management of Elemental cloud-init files and their distribution to nodes within the cluster using k8s object selectors. harvester-node-manager will place an inotify watch on the cloud-init directory to do just-in-time reconciliation for files that correspond to a CloudInit CR (if the CloudInit matchSelector matches the node's labels).
- Loading branch information
Connor Kuehl
committed
Sep 6, 2023
1 parent
b1a0219
commit 5953a05
Showing
324 changed files
with
201,969 additions
and
149 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
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,62 @@ | ||
|
||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
{} | ||
creationTimestamp: null | ||
name: cloudinits.node.harvesterhci.io | ||
spec: | ||
group: node.harvesterhci.io | ||
names: | ||
kind: CloudInit | ||
listKind: CloudInitList | ||
plural: cloudinits | ||
shortNames: | ||
- nci | ||
singular: cloudinit | ||
scope: Cluster | ||
versions: | ||
- name: v1beta1 | ||
schema: | ||
openAPIV3Schema: | ||
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: | ||
properties: | ||
contents: | ||
type: string | ||
filename: | ||
type: string | ||
matchSelector: | ||
additionalProperties: | ||
type: string | ||
type: object | ||
required: | ||
- contents | ||
- filename | ||
- matchSelector | ||
type: object | ||
required: | ||
- spec | ||
type: object | ||
served: true | ||
storage: true | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
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,22 @@ | ||
package v1beta1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// +genclient | ||
// +genclient:nonNamespaced | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
// +kubebuilder:resource:shortName=nci,scope=Cluster | ||
|
||
type CloudInit struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
Spec CloudInitSpec `json:"spec"` | ||
} | ||
|
||
type CloudInitSpec struct { | ||
MatchSelector map[string]string `json:"matchSelector"` | ||
Filename string `json:"filename"` | ||
Contents string `json:"contents"` | ||
} |
83 changes: 83 additions & 0 deletions
83
pkg/apis/node.harvesterhci.io/v1beta1/zz_generated_deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
pkg/apis/node.harvesterhci.io/v1beta1/zz_generated_list_types.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
pkg/apis/node.harvesterhci.io/v1beta1/zz_generated_register.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.