Skip to content

Instantly share code, notes, and snippets.

@girishramnani
Created May 26, 2021 08:30
Show Gist options
  • Save girishramnani/cbb4400e463efe89c13f1386e0788793 to your computer and use it in GitHub Desktop.
Save girishramnani/cbb4400e463efe89c13f1386e0788793 to your computer and use it in GitHub Desktop.
CRD of servicebinding
{
"kind": "CustomResourceDefinition",
"apiVersion": "apiextensions.k8s.io/v1",
"metadata": {
"name": "servicebindings.operators.coreos.com",
"selfLink": "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/servicebindings.operators.coreos.com",
"uid": "8d92fd7d-e982-4ad5-9805-59fbdcdf02b1",
"resourceVersion": "39711",
"generation": 1,
"creationTimestamp": "2020-11-25T09:00:01Z",
"labels": {
"operators.coreos.com/rh-service-binding-operator.openshift-operators": ""
},
"managedFields": [
{
"manager": "catalog",
"operation": "Update",
"apiVersion": "apiextensions.k8s.io/v1beta1",
"time": "2020-11-25T09:00:01Z",
"fieldsType": "FieldsV1",
"fieldsV1": {"f:spec":{"f:conversion":{".":{},"f:strategy":{}},"f:group":{},"f:names":{"f:kind":{},"f:listKind":{},"f:plural":{},"f:shortNames":{},"f:singular":{}},"f:preserveUnknownFields":{},"f:scope":{},"f:subresources":{".":{},"f:status":{}},"f:validation":{".":{},"f:openAPIV3Schema":{".":{},"f:description":{},"f:properties":{".":{},"f:apiVersion":{".":{},"f:description":{},"f:type":{}},"f:kind":{".":{},"f:description":{},"f:type":{}},"f:metadata":{".":{},"f:type":{}},"f:spec":{".":{},"f:description":{},"f:properties":{".":{},"f:application":{".":{},"f:description":{},"f:properties":{".":{},"f:bindingPath":{".":{},"f:description":{},"f:properties":{".":{},"f:containersPath":{".":{},"f:description":{},"f:type":{}},"f:secretPath":{".":{},"f:description":{},"f:type":{}}},"f:type":{}},"f:group":{".":{},"f:type":{}},"f:labelSelector":{".":{},"f:description":{},"f:properties":{".":{},"f:matchExpressions":{".":{},"f:description":{},"f:items":{},"f:type":{}},"f:matchLabels":{".":{},"f:additionalProperties":{},"f:description":{},"f:type":{}}},"f:type":{}},"f:name":{".":{},"f:description":{},"f:type":{}},"f:resource":{".":{},"f:type":{}},"f:version":{".":{},"f:type":{}}},"f:required":{},"f:type":{}},"f:customEnvVar":{".":{},"f:description":{},"f:items":{},"f:type":{}},"f:detectBindingResources":{".":{},"f:description":{},"f:type":{}},"f:envVarPrefix":{".":{},"f:description":{},"f:type":{}},"f:mountPathPrefix":{".":{},"f:description":{},"f:type":{}},"f:services":{".":{},"f:description":{},"f:items":{},"f:type":{}}},"f:type":{}},"f:status":{".":{},"f:description":{},"f:properties":{".":{},"f:applications":{".":{},"f:description":{},"f:items":{},"f:type":{}},"f:conditions":{".":{},"f:description":{},"f:items":{},"f:type":{}},"f:secret":{".":{},"f:description":{},"f:type":{}}},"f:required":{},"f:type":{}}},"f:type":{}}},"f:version":{},"f:versions":{}},"f:status":{"f:storedVersions":{}}}
},
{
"manager": "kube-apiserver",
"operation": "Update",
"apiVersion": "apiextensions.k8s.io/v1",
"time": "2020-11-25T09:00:01Z",
"fieldsType": "FieldsV1",
"fieldsV1": {"f:status":{"f:acceptedNames":{"f:kind":{},"f:listKind":{},"f:plural":{},"f:shortNames":{},"f:singular":{}},"f:conditions":{}}}
},
{
"manager": "olm",
"operation": "Update",
"apiVersion": "apiextensions.k8s.io/v1",
"time": "2020-11-25T09:00:02Z",
"fieldsType": "FieldsV1",
"fieldsV1": {"f:metadata":{"f:labels":{".":{},"f:operators.coreos.com/rh-service-binding-operator.openshift-operators":{}}}}
}
]
},
"spec": {
"group": "operators.coreos.com",
"names": {
"plural": "servicebindings",
"singular": "servicebinding",
"shortNames": [
"sbr",
"sbrs"
],
"kind": "ServiceBinding",
"listKind": "ServiceBindingList"
},
"scope": "Namespaced",
"versions": [
{
"name": "v1alpha1",
"served": true,
"storage": true,
"schema": {
"openAPIV3Schema": {
"description": "ServiceBinding expresses intent to bind an operator-backed service with an application workload.",
"type": "object",
"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",
"type": "object",
"properties": {
"application": {
"description": "Application is used to identify the application connecting to the backing service operator.",
"type": "object",
"required": [
"group",
"resource",
"version"
],
"properties": {
"bindingPath": {
"description": "BindingPath refers to the paths in the application workload's schema where the binding workload would be referenced. If BindingPath is not specified the default path locations is going to be used. The default location for ContainersPath is going to be: \"spec.template.spec.containers\" and if SecretPath is not specified, the name of the secret object is not going to be specified.",
"type": "object",
"properties": {
"containersPath": {
"description": "ContainersPath defines the path to the corev1.Containers reference If BindingPath is not specified, the default location is going to be: \"spec.template.spec.containers\"",
"type": "string"
},
"secretPath": {
"description": "SecretPath defines the path to a string field where the name of the secret object is going to be assigned. Note: The name of the secret object is same as that of the name of SBR CR (metadata.name)",
"type": "string"
}
}
},
"group": {
"type": "string"
},
"labelSelector": {
"description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.",
"type": "object",
"properties": {
"matchExpressions": {
"description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
"type": "array",
"items": {"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","type":"object","required":["key","operator"],"properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","type":"array","items":{"type":"string"}}}}
},
"matchLabels": {
"description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
"type": "object",
"additionalProperties": {"type":"string"}
}
}
},
"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"
},
"resource": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"customEnvVar": {
"description": "Custom env variables",
"type": "array",
"items": {"description":"EnvVar represents an environment variable present in a Container.","type":"object","required":["name"],"properties":{"name":{"description":"Name of the environment variable. Must be a C_IDENTIFIER.","type":"string"},"value":{"description":"Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".","type":"string"},"valueFrom":{"description":"Source for the environment variable's value. Cannot be used if value is not empty.","type":"object","properties":{"configMapKeyRef":{"description":"Selects a key of a ConfigMap.","type":"object","required":["key"],"properties":{"key":{"description":"The key to select.","type":"string"},"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"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}}},"fieldRef":{"description":"Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.","type":"object","required":["fieldPath"],"properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}}},"resourceFieldRef":{"description":"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.","type":"object","required":["resource"],"properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{"description":"Specifies the output format of the exposed resources, defaults to \"1\"","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}}},"secretKeyRef":{"description":"Selects a key of a secret in the pod's namespace","type":"object","required":["key"],"properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"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"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}}}}}}}
},
"detectBindingResources": {
"description": "DetectBindingResources is flag used to bind all non-bindable variables from different subresources owned by backing operator CR.",
"type": "boolean"
},
"envVarPrefix": {
"description": "EnvVarPrefix is the prefix for environment variables",
"type": "string"
},
"mountPathPrefix": {
"description": "MountPathPrefix is the prefix for volume mount",
"type": "string"
},
"services": {
"description": "Services is used to identify multiple backing services.",
"type": "array",
"items": {"description":"Service defines the selector based on resource name, version, and resource kind","type":"object","required":["group","kind","version"],"properties":{"envVarPrefix":{"type":"string"},"group":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"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"},"namespace":{"type":"string"},"version":{"type":"string"}}}
}
}
},
"status": {
"description": "ServiceBindingStatus defines the observed state of ServiceBinding",
"type": "object",
"required": [
"conditions",
"secret"
],
"properties": {
"applications": {
"description": "Applications contain all the applications filtered by name or label",
"type": "array",
"items": {"description":"BoundApplication defines the application workloads to which the binding secret has injected.","type":"object","required":["group","kind","version"],"properties":{"group":{"type":"string"},"kind":{"type":"string"},"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"},"version":{"type":"string"}}}
},
"conditions": {
"description": "Conditions describes the state of the operator's reconciliation functionality.",
"type": "array",
"items": {"description":"Condition represents the state of the operator's reconciliation functionality.","type":"object","required":["status","type"],"properties":{"lastHeartbeatTime":{"type":"string","format":"date-time"},"lastTransitionTime":{"type":"string","format":"date-time"},"message":{"type":"string"},"reason":{"type":"string"},"status":{"type":"string"},"type":{"description":"ConditionType is the state of the operator's reconciliation functionality.","type":"string"}}}
},
"secret": {
"description": "Secret is the name of the intermediate secret",
"type": "string"
}
}
}
}
}
},
"subresources": {
"status": {}
}
}
],
"conversion": {
"strategy": "None"
},
"preserveUnknownFields": true
},
"status": {
"conditions": [
{
"type": "NamesAccepted",
"status": "True",
"lastTransitionTime": "2020-11-25T09:00:01Z",
"reason": "NoConflicts",
"message": "no conflicts found"
},
{
"type": "Established",
"status": "True",
"lastTransitionTime": "2020-11-25T09:00:01Z",
"reason": "InitialNamesAccepted",
"message": "the initial names have been accepted"
},
{
"type": "NonStructuralSchema",
"status": "True",
"lastTransitionTime": "2020-11-25T09:00:01Z",
"reason": "Violations",
"message": "spec.preserveUnknownFields: Invalid value: true: must be false"
}
],
"acceptedNames": {
"plural": "servicebindings",
"singular": "servicebinding",
"shortNames": [
"sbr",
"sbrs"
],
"kind": "ServiceBinding",
"listKind": "ServiceBindingList"
},
"storedVersions": [
"v1alpha1"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment