-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add stolostron/cluster-templates-operator
Signed-off-by: Sebastian Hoß <[email protected]>
- Loading branch information
Showing
17 changed files
with
849 additions
and
0 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
1 change: 1 addition & 0 deletions
1
...er-templates-operator/clustertemplate.openshift.io/v1alpha1/clustertemplateinstances.args
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 @@ | ||
--derive=PartialEq |
199 changes: 199 additions & 0 deletions
199
...er-templates-operator/clustertemplate.openshift.io/v1alpha1/clustertemplateinstances.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,199 @@ | ||
apiVersion: "apiextensions.k8s.io/v1" | ||
kind: "CustomResourceDefinition" | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: "v0.9.0" | ||
name: "clustertemplateinstances.clustertemplate.openshift.io" | ||
spec: | ||
group: "clustertemplate.openshift.io" | ||
names: | ||
kind: "ClusterTemplateInstance" | ||
listKind: "ClusterTemplateInstanceList" | ||
plural: "clustertemplateinstances" | ||
shortNames: | ||
- "cti" | ||
- "ctis" | ||
singular: "clustertemplateinstance" | ||
scope: "Namespaced" | ||
versions: | ||
- additionalPrinterColumns: | ||
- description: "Cluster phase" | ||
jsonPath: ".status.phase" | ||
name: "Phase" | ||
type: "string" | ||
- description: "Admin Secret" | ||
jsonPath: ".status.adminPassword.name" | ||
name: "Adminpassword" | ||
type: "string" | ||
- description: "Kubeconfig Secret" | ||
jsonPath: ".status.kubeconfig.name" | ||
name: "Kubeconfig" | ||
type: "string" | ||
- description: "API URL" | ||
jsonPath: ".status.apiServerURL" | ||
name: "API URL" | ||
type: "string" | ||
name: "v1alpha1" | ||
schema: | ||
openAPIV3Schema: | ||
description: "Represents instance of a cluster" | ||
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: | ||
clusterTemplateRef: | ||
description: "A reference to ClusterTemplate which will be used for installing and setting up the cluster" | ||
type: "string" | ||
kubeconfigSecretRef: | ||
description: "A reference to a secret which contains kubeconfig of the cluster. If specified day1 operation won't be executed." | ||
type: "string" | ||
parameters: | ||
description: "Helm parameters to be passed to cluster installation or setup" | ||
items: | ||
properties: | ||
clusterSetup: | ||
description: "Name of the application set to which parameter is applied" | ||
type: "string" | ||
name: | ||
description: "Name of the Helm parameter" | ||
type: "string" | ||
value: | ||
description: "Value of the Helm parameter" | ||
type: "string" | ||
required: | ||
- "name" | ||
- "value" | ||
type: "object" | ||
type: "array" | ||
required: | ||
- "clusterTemplateRef" | ||
type: "object" | ||
status: | ||
properties: | ||
adminPassword: | ||
description: "A reference for secret which contains username and password under keys \"username\" and \"password\"" | ||
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" | ||
apiServerURL: | ||
description: "API server URL of the new cluster" | ||
type: "string" | ||
clusterSetup: | ||
description: "Status of each cluster setup" | ||
items: | ||
properties: | ||
message: | ||
description: "Description of the cluster setup status" | ||
type: "string" | ||
name: | ||
description: "Name of the cluster setup" | ||
type: "string" | ||
status: | ||
description: "Status of the cluster setup" | ||
type: "string" | ||
required: | ||
- "message" | ||
- "name" | ||
- "status" | ||
type: "object" | ||
type: "array" | ||
clusterSetupSecrets: | ||
description: "Secrets create by cluster setup which provide credentials for applications created by cluster setup" | ||
items: | ||
description: "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace." | ||
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" | ||
type: "array" | ||
conditions: | ||
description: "Resource conditions" | ||
items: | ||
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" | ||
properties: | ||
lastTransitionTime: | ||
description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable." | ||
format: "date-time" | ||
type: "string" | ||
message: | ||
description: "message is a human readable message indicating details about the transition. This may be an empty string." | ||
maxLength: 32768 | ||
type: "string" | ||
observedGeneration: | ||
description: "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance." | ||
format: "int64" | ||
minimum: 0.0 | ||
type: "integer" | ||
reason: | ||
description: "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty." | ||
maxLength: 1024 | ||
minLength: 1 | ||
pattern: "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$" | ||
type: "string" | ||
status: | ||
description: "status of the condition, one of True, False, Unknown." | ||
enum: | ||
- "True" | ||
- "False" | ||
- "Unknown" | ||
type: "string" | ||
type: | ||
description: "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)" | ||
maxLength: 316 | ||
pattern: "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$" | ||
type: "string" | ||
required: | ||
- "lastTransitionTime" | ||
- "message" | ||
- "reason" | ||
- "status" | ||
- "type" | ||
type: "object" | ||
type: "array" | ||
consoleURL: | ||
description: "Console URL of the new cluster. The value is taken from ManagedCluster." | ||
type: "string" | ||
firstLoginAttempt: | ||
description: "Time of first attempt of login to a new cluster" | ||
format: "date-time" | ||
type: "string" | ||
kubeconfig: | ||
description: "A reference for secret which contains kubeconfig under key \"kubeconfig\"" | ||
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" | ||
managedCluster: | ||
description: "A reference to ManagedCluster resource" | ||
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" | ||
message: | ||
description: "Additional message for Phase" | ||
type: "string" | ||
phase: | ||
description: "Represents instance installaton & setup phase" | ||
type: "string" | ||
required: | ||
- "conditions" | ||
- "message" | ||
- "phase" | ||
type: "object" | ||
type: "object" | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
89 changes: 89 additions & 0 deletions
89
...uster-templates-operator/clustertemplate.openshift.io/v1alpha1/clustertemplatequotas.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,89 @@ | ||
apiVersion: "apiextensions.k8s.io/v1" | ||
kind: "CustomResourceDefinition" | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: "v0.9.0" | ||
name: "clustertemplatequotas.clustertemplate.openshift.io" | ||
spec: | ||
group: "clustertemplate.openshift.io" | ||
names: | ||
kind: "ClusterTemplateQuota" | ||
listKind: "ClusterTemplateQuotaList" | ||
plural: "clustertemplatequotas" | ||
shortNames: | ||
- "ctq" | ||
- "ctqs" | ||
singular: "clustertemplatequota" | ||
scope: "Namespaced" | ||
versions: | ||
- name: "v1alpha1" | ||
schema: | ||
openAPIV3Schema: | ||
description: "Defines which ClusterTemplates can be used in a given namespace" | ||
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: | ||
allowedTemplates: | ||
description: "Represents all ClusterTemplates which can be used in given namespace" | ||
items: | ||
properties: | ||
count: | ||
description: "Defines how many instances of the ClusterTemplate can exist" | ||
minimum: 1.0 | ||
type: "integer" | ||
deleteAfter: | ||
description: "Template instance will be removed after specified time This is a Duration value; see https://pkg.go.dev/time#ParseDuration for accepted formats. Note: due to discrepancies in validation vs parsing, we use a Pattern instead of `Format=duration`. See https://bugzilla.redhat.com/show_bug.cgi?id=2050332 https://github.com/kubernetes/apimachinery/issues/131 https://github.com/kubernetes/apiextensions-apiserver/issues/56" | ||
pattern: "^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" | ||
type: "string" | ||
name: | ||
description: "Name of the ClusterTemplate" | ||
type: "string" | ||
required: | ||
- "name" | ||
type: "object" | ||
type: "array" | ||
budget: | ||
description: "Total budget for all clusters within given namespace" | ||
minimum: 1.0 | ||
type: "integer" | ||
required: | ||
- "allowedTemplates" | ||
type: "object" | ||
status: | ||
description: "ClusterTemplateQuotaStatus defines the observed state of ClusterTemplateQuota" | ||
properties: | ||
budgetSpent: | ||
description: "How much budget is currenly spent" | ||
type: "integer" | ||
templateInstances: | ||
description: "Which instances are in use" | ||
items: | ||
properties: | ||
count: | ||
description: "Defines how many instances of the ClusterTemplate exist" | ||
type: "integer" | ||
name: | ||
description: "Name of the ClusterTemplate" | ||
type: "string" | ||
required: | ||
- "count" | ||
- "name" | ||
type: "object" | ||
type: "array" | ||
required: | ||
- "budgetSpent" | ||
- "templateInstances" | ||
type: "object" | ||
type: "object" | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
Oops, something went wrong.