diff --git a/api/v1/types.go b/api/v1/types.go index d3166377..271eb7a5 100644 --- a/api/v1/types.go +++ b/api/v1/types.go @@ -15,8 +15,3 @@ type SecretKeyReference struct { // The key of the secret to select from. Must be a valid secret key. Key string `json:"key"` } - -type ResourceKey struct { - Name string `json:"name"` - Namespace string `json:"namespace"` -} diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index ec23d0e8..03fd1a7c 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -61,21 +61,6 @@ func (in *ParametersFromSource) DeepCopy() *ParametersFromSource { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceKey) DeepCopyInto(out *ResourceKey) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceKey. -func (in *ResourceKey) DeepCopy() *ResourceKey { - if in == nil { - return nil - } - out := new(ResourceKey) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SecretKeyReference) DeepCopyInto(out *SecretKeyReference) { *out = *in diff --git a/config/samples/services_v1_serviceinstance.yaml b/config/samples/services_v1_serviceinstance.yaml index f207ae6e..bd19f598 100644 --- a/config/samples/services_v1_serviceinstance.yaml +++ b/config/samples/services_v1_serviceinstance.yaml @@ -1,7 +1,7 @@ apiVersion: services.cloud.sap.com/v1 kind: ServiceInstance metadata: - name: sample-instance-2 + name: sample-instance-1 spec: serviceOfferingName: service-manager servicePlanName: subaccount-audit diff --git a/controllers/serviceinstance_controller.go b/controllers/serviceinstance_controller.go index 1a4bf1f1..c5cea1b6 100644 --- a/controllers/serviceinstance_controller.go +++ b/controllers/serviceinstance_controller.go @@ -122,7 +122,7 @@ func (r *ServiceInstanceReconciler) Reconcile(ctx context.Context, req ctrl.Requ log.Info(fmt.Sprintf("instance is not in final state, handling... (generation: %d, observedGen: %d", serviceInstance.Generation, serviceInstance.Status.ObservedGeneration)) serviceInstance.SetObservedGeneration(serviceInstance.Generation) - smClient, err := r.GetSMClient(ctx, r.Client, serviceInstance) + smClient, err := r.GetSMClient(ctx, serviceInstance) if err != nil { log.Error(err, "failed to get sm client") return utils.MarkAsTransientError(ctx, r.Client, common.Unknown, err, serviceInstance) @@ -266,7 +266,7 @@ func (r *ServiceInstanceReconciler) deleteInstance(ctx context.Context, serviceI log := utils.GetLogger(ctx) if controllerutil.ContainsFinalizer(serviceInstance, common.FinalizerName) { - smClient, err := r.GetSMClient(ctx, r.Client, serviceInstance) + smClient, err := r.GetSMClient(ctx, serviceInstance) if err != nil { log.Error(err, "failed to get sm client") return utils.MarkAsTransientError(ctx, r.Client, common.Unknown, err, serviceInstance) @@ -348,7 +348,7 @@ func (r *ServiceInstanceReconciler) handleInstanceSharing(ctx context.Context, s func (r *ServiceInstanceReconciler) poll(ctx context.Context, serviceInstance *v1.ServiceInstance) (ctrl.Result, error) { log := utils.GetLogger(ctx) log.Info(fmt.Sprintf("resource is in progress, found operation url %s", serviceInstance.Status.OperationURL)) - smClient, err := r.GetSMClient(ctx, r.Client, serviceInstance) + smClient, err := r.GetSMClient(ctx, serviceInstance) if err != nil { log.Error(err, "failed to get sm client") return utils.MarkAsTransientError(ctx, r.Client, common.Unknown, err, serviceInstance) diff --git a/sapbtp-operator-charts/templates/crd.yml b/sapbtp-operator-charts/templates/crd.yml index e69de29b..551cbd69 100644 --- a/sapbtp-operator-charts/templates/crd.yml +++ b/sapbtp-operator-charts/templates/crd.yml @@ -0,0 +1,1108 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.15.0 + name: servicebindings.services.cloud.sap.com +spec: + group: services.cloud.sap.com + names: + kind: ServiceBinding + listKind: ServiceBindingList + plural: servicebindings + singular: servicebinding + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.serviceInstanceName + name: Instance + type: string + - jsonPath: .status.conditions[0].reason + name: Status + type: string + - jsonPath: .status.ready + name: Ready + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.bindingID + name: ID + priority: 1 + type: string + - jsonPath: .status.conditions[0].message + name: Message + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: ServiceBinding is the Schema for the servicebindings 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: ServiceBindingSpec defines the desired state of ServiceBinding + properties: + credentialsRotationPolicy: + description: CredentialsRotationPolicy holds automatic credentials + rotation configuration. + properties: + enabled: + type: boolean + rotatedBindingTTL: + description: For how long to keep the rotated binding. + type: string + rotationFrequency: + description: What frequency to perform binding rotation. + type: string + required: + - enabled + type: object + externalName: + description: The name of the binding in Service Manager + type: string + parameters: + description: |- + Parameters for the binding. + + + The Parameters field is NOT secret or secured in any way and should + NEVER be used to hold sensitive information. To set parameters that + contain secret information, you should ALWAYS store that information + in a Secret and use the ParametersFrom field. + type: object + x-kubernetes-preserve-unknown-fields: true + parametersFrom: + description: |- + List of sources to populate parameters. + If a top-level parameter name exists in multiples sources among + `Parameters` and `ParametersFrom` fields, it is + considered to be a user error in the specification + items: + description: ParametersFromSource represents the source of a set + of Parameters + properties: + secretKeyRef: + description: |- + The Secret key to select from. + The value must be a JSON object. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: The name of the secret in the pod's namespace + to select from. + type: string + required: + - key + - name + type: object + type: object + type: array + secretKey: + description: |- + SecretKey is used as the key inside the secret to store the credentials + returned by the broker encoded as json to support complex data structures. + If not specified, the credentials returned by the broker will be used + directly as the secrets data. + type: string + secretName: + description: SecretName is the name of the secret where credentials + will be stored + type: string + secretRootKey: + description: |- + SecretRootKey is used as the key inside the secret to store all binding + data including credentials returned by the broker and additional info under single key. + Convenient way to store whole binding data in single file when using `volumeMounts`. + type: string + secretTemplate: + description: |- + SecretTemplate is a Go template that generates a custom Kubernetes + v1/Secret based on data from the service binding returned by Service Manager and the instance information. + The generated secret is used instead of the default secret. + This is useful if the consumer of service binding data expects them in + a specific format. + For Go templates see https://pkg.go.dev/text/template. + For supported funcs see: https://pkg.go.dev/text/template#hdr-Functions, https://masterminds.github.io/sprig/ + type: string + x-kubernetes-preserve-unknown-fields: true + serviceInstanceName: + description: The k8s name of the service instance to bind, should + be in the namespace of the binding + minLength: 1 + type: string + serviceInstanceNamespace: + description: The namespace of the referenced instance, if empty Binding's + namespace will be used + type: string + userInfo: + description: |- + UserInfo contains information about the user that last modified this + instance. This field is set by the API server and not settable by the + end-user. User-provided values for this field are not saved. + properties: + extra: + additionalProperties: + description: ExtraValue masks the value so protobuf can generate + items: + type: string + type: array + description: Any additional information provided by the authenticator. + type: object + groups: + description: The names of groups this user is a part of. + items: + type: string + type: array + x-kubernetes-list-type: atomic + uid: + description: |- + A unique value that identifies this user across time. If this user is + deleted and another user by the same name is added, they will have + different UIDs. + type: string + username: + description: The name that uniquely identifies this user among + all active users. + type: string + type: object + required: + - serviceInstanceName + type: object + status: + description: ServiceBindingStatus defines the observed state of ServiceBinding + properties: + bindingID: + description: The generated ID of the binding, will be automatically + filled once the binding is created + type: string + conditions: + description: Service binding conditions + items: + description: "Condition contains details for one aspect of the current + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" + 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 + 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 + instanceID: + description: The ID of the instance in SM associated with binding + type: string + lastCredentialsRotationTime: + description: Indicates when binding secret was rotated + format: date-time + type: string + observedGeneration: + description: Last generation that was acted on + format: int64 + type: integer + operationType: + description: The operation type (CREATE/UPDATE/DELETE) for ongoing + operation + type: string + operationURL: + description: URL of ongoing operation for the service binding + type: string + ready: + description: Indicates whether binding is ready for usage + type: string + subaccountID: + description: The subaccount id of the service binding + type: string + required: + - conditions + type: object + type: object + served: true + storage: true + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.serviceInstanceName + name: Instance + type: string + - jsonPath: .status.conditions[0].reason + name: Status + type: string + - jsonPath: .status.ready + name: Ready + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.bindingID + name: ID + priority: 1 + type: string + - jsonPath: .status.conditions[0].message + name: Message + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: ServiceBinding is the Schema for the servicebindings 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: ServiceBindingSpec defines the desired state of ServiceBinding + properties: + credentialsRotationPolicy: + description: CredentialsRotationPolicy holds automatic credentials + rotation configuration. + properties: + enabled: + type: boolean + rotatedBindingTTL: + description: For how long to keep the rotated binding. + type: string + rotationFrequency: + description: What frequency to perform binding rotation. + type: string + required: + - enabled + type: object + externalName: + description: The name of the binding in Service Manager + type: string + parameters: + description: |- + Parameters for the binding. + + + The Parameters field is NOT secret or secured in any way and should + NEVER be used to hold sensitive information. To set parameters that + contain secret information, you should ALWAYS store that information + in a Secret and use the ParametersFrom field. + type: object + x-kubernetes-preserve-unknown-fields: true + parametersFrom: + description: |- + List of sources to populate parameters. + If a top-level parameter name exists in multiples sources among + `Parameters` and `ParametersFrom` fields, it is + considered to be a user error in the specification + items: + description: ParametersFromSource represents the source of a set + of Parameters + properties: + secretKeyRef: + description: |- + The Secret key to select from. + The value must be a JSON object. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: The name of the secret in the pod's namespace + to select from. + type: string + required: + - key + - name + type: object + type: object + type: array + secretKey: + description: |- + SecretKey is used as the key inside the secret to store the credentials + returned by the broker encoded as json to support complex data structures. + If not specified, the credentials returned by the broker will be used + directly as the secrets data. + type: string + secretName: + description: SecretName is the name of the secret where credentials + will be stored + type: string + secretRootKey: + description: |- + SecretRootKey is used as the key inside the secret to store all binding + data including credentials returned by the broker and additional info under single key. + Convenient way to store whole binding data in single file when using `volumeMounts`. + type: string + serviceInstanceName: + description: The k8s name of the service instance to bind, should + be in the namespace of the binding + minLength: 1 + type: string + userInfo: + description: |- + UserInfo contains information about the user that last modified this + instance. This field is set by the API server and not settable by the + end-user. User-provided values for this field are not saved. + properties: + extra: + additionalProperties: + description: ExtraValue masks the value so protobuf can generate + items: + type: string + type: array + description: Any additional information provided by the authenticator. + type: object + groups: + description: The names of groups this user is a part of. + items: + type: string + type: array + x-kubernetes-list-type: atomic + uid: + description: |- + A unique value that identifies this user across time. If this user is + deleted and another user by the same name is added, they will have + different UIDs. + type: string + username: + description: The name that uniquely identifies this user among + all active users. + type: string + type: object + required: + - serviceInstanceName + type: object + status: + description: ServiceBindingStatus defines the observed state of ServiceBinding + properties: + bindingID: + description: The generated ID of the binding, will be automatically + filled once the binding is created + type: string + conditions: + description: Service binding conditions + items: + description: "Condition contains details for one aspect of the current + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" + 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 + 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 + instanceID: + description: The ID of the instance in SM associated with binding + type: string + lastCredentialsRotationTime: + description: Indicates when binding secret was rotated + format: date-time + type: string + observedGeneration: + description: Last generation that was acted on + format: int64 + type: integer + operationType: + description: The operation type (CREATE/UPDATE/DELETE) for ongoing + operation + type: string + operationURL: + description: URL of ongoing operation for the service binding + type: string + ready: + description: Indicates whether binding is ready for usage + type: string + required: + - conditions + type: object + type: object + served: true + storage: false + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.15.0 + name: serviceinstances.services.cloud.sap.com +spec: + group: services.cloud.sap.com + names: + kind: ServiceInstance + listKind: ServiceInstanceList + plural: serviceinstances + singular: serviceinstance + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.serviceOfferingName + name: Offering + type: string + - jsonPath: .spec.servicePlanName + name: Plan + type: string + - jsonPath: .spec.shared + name: shared + type: boolean + - jsonPath: .spec.dataCenter + name: dataCenter + type: string + - jsonPath: .status.conditions[0].reason + name: Status + type: string + - jsonPath: .status.ready + name: Ready + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.instanceID + name: ID + priority: 1 + type: string + - jsonPath: .status.conditions[0].message + name: Message + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: ServiceInstance is the Schema for the serviceinstances 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: ServiceInstanceSpec defines the desired state of ServiceInstance + properties: + btpAccessCredentialsSecret: + description: The name of the btp access credentials secret + type: string + customTags: + description: List of custom tags describing the ServiceInstance, will + be copied to `ServiceBinding` secret in the key called `tags`. + items: + type: string + type: array + dataCenter: + description: The dataCenter in case service offering and plan name + exist in other data center and not on main + type: string + externalName: + description: The name of the instance in Service Manager + type: string + parameters: + description: |- + Provisioning parameters for the instance. + + + The Parameters field is NOT secret or secured in any way and should + NEVER be used to hold sensitive information. To set parameters that + contain secret information, you should ALWAYS store that information + in a Secret and use the ParametersFrom field. + type: object + x-kubernetes-preserve-unknown-fields: true + parametersFrom: + description: |- + List of sources to populate parameters. + If a top-level parameter name exists in multiples sources among + `Parameters` and `ParametersFrom` fields, it is + considered to be a user error in the specification + items: + description: ParametersFromSource represents the source of a set + of Parameters + properties: + secretKeyRef: + description: |- + The Secret key to select from. + The value must be a JSON object. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: The name of the secret in the pod's namespace + to select from. + type: string + required: + - key + - name + type: object + type: object + type: array + serviceOfferingName: + description: The name of the service offering + minLength: 1 + type: string + servicePlanID: + description: The plan ID in case service offering and plan name are + ambiguous + type: string + servicePlanName: + description: The name of the service plan + minLength: 1 + type: string + shared: + description: Indicates the desired shared state + type: boolean + userInfo: + description: |- + UserInfo contains information about the user that last modified this + instance. This field is set by the API server and not settable by the + end-user. User-provided values for this field are not saved. + properties: + extra: + additionalProperties: + description: ExtraValue masks the value so protobuf can generate + items: + type: string + type: array + description: Any additional information provided by the authenticator. + type: object + groups: + description: The names of groups this user is a part of. + items: + type: string + type: array + x-kubernetes-list-type: atomic + uid: + description: |- + A unique value that identifies this user across time. If this user is + deleted and another user by the same name is added, they will have + different UIDs. + type: string + username: + description: The name that uniquely identifies this user among + all active users. + type: string + type: object + required: + - serviceOfferingName + - servicePlanName + type: object + status: + description: ServiceInstanceStatus defines the observed state of ServiceInstance + properties: + conditions: + description: Service instance conditions + items: + description: "Condition contains details for one aspect of the current + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" + 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 + 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 + hashedSpec: + description: HashedSpec is the hashed spec without the shared property + type: string + instanceID: + description: The generated ID of the instance, will be automatically + filled once the instance is created + type: string + observedGeneration: + description: Last generation that was acted on + format: int64 + type: integer + operationType: + description: The operation type (CREATE/UPDATE/DELETE) for ongoing + operation + type: string + operationURL: + description: URL of ongoing operation for the service instance + type: string + ready: + description: Indicates whether instance is ready for usage + type: string + subaccountID: + description: The subaccount id of the service instance + type: string + tags: + description: Tags describing the ServiceInstance as provided in service + catalog, will be copied to `ServiceBinding` secret in the key called + `tags`. + items: + type: string + type: array + required: + - conditions + type: object + type: object + served: true + storage: true + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.serviceOfferingName + name: Offering + type: string + - jsonPath: .spec.servicePlanName + name: Plan + type: string + - jsonPath: .status.conditions[0].reason + name: Status + type: string + - jsonPath: .status.ready + name: Ready + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.instanceID + name: ID + priority: 1 + type: string + - jsonPath: .status.conditions[0].message + name: Message + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: ServiceInstance is the Schema for the serviceinstances 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: ServiceInstanceSpec defines the desired state of ServiceInstance + properties: + customTags: + description: List of custom tags describing the ServiceInstance, will + be copied to `ServiceBinding` secret in the key called `tags`. + items: + type: string + type: array + externalName: + description: The name of the instance in Service Manager + type: string + parameters: + description: |- + Provisioning parameters for the instance. + + + The Parameters field is NOT secret or secured in any way and should + NEVER be used to hold sensitive information. To set parameters that + contain secret information, you should ALWAYS store that information + in a Secret and use the ParametersFrom field. + type: object + x-kubernetes-preserve-unknown-fields: true + parametersFrom: + description: |- + List of sources to populate parameters. + If a top-level parameter name exists in multiples sources among + `Parameters` and `ParametersFrom` fields, it is + considered to be a user error in the specification + items: + description: ParametersFromSource represents the source of a set + of Parameters + properties: + secretKeyRef: + description: |- + The Secret key to select from. + The value must be a JSON object. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: The name of the secret in the pod's namespace + to select from. + type: string + required: + - key + - name + type: object + type: object + type: array + serviceOfferingName: + description: The name of the service offering + minLength: 1 + type: string + servicePlanID: + description: The plan ID in case service offering and plan name are + ambiguous + type: string + servicePlanName: + description: The name of the service plan + minLength: 1 + type: string + shared: + description: Indicates the desired shared state + type: boolean + userInfo: + description: |- + UserInfo contains information about the user that last modified this + instance. This field is set by the API server and not settable by the + end-user. User-provided values for this field are not saved. + properties: + extra: + additionalProperties: + description: ExtraValue masks the value so protobuf can generate + items: + type: string + type: array + description: Any additional information provided by the authenticator. + type: object + groups: + description: The names of groups this user is a part of. + items: + type: string + type: array + x-kubernetes-list-type: atomic + uid: + description: |- + A unique value that identifies this user across time. If this user is + deleted and another user by the same name is added, they will have + different UIDs. + type: string + username: + description: The name that uniquely identifies this user among + all active users. + type: string + type: object + required: + - serviceOfferingName + - servicePlanName + type: object + status: + description: ServiceInstanceStatus defines the observed state of ServiceInstance + properties: + conditions: + description: Service instance conditions + items: + description: "Condition contains details for one aspect of the current + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" + 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 + 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 + instanceID: + description: The generated ID of the instance, will be automatically + filled once the instance is created + type: string + observedGeneration: + description: Last generation that was acted on + format: int64 + type: integer + operationType: + description: The operation type (CREATE/UPDATE/DELETE) for ongoing + operation + type: string + operationURL: + description: URL of ongoing operation for the service instance + type: string + ready: + description: Indicates whether instance is ready for usage + type: string + tags: + description: Tags describing the ServiceInstance as provided in service + catalog, will be copied to `ServiceBinding` secret in the key called + `tags`. + items: + type: string + type: array + required: + - conditions + type: object + type: object + served: true + storage: false + subresources: + status: {}