diff --git a/charts/oam-kubernetes-runtime/crds/core.oam.dev_applicationconfigurations.yaml b/charts/oam-kubernetes-runtime/crds/core.oam.dev_applicationconfigurations.yaml index 1eb3e071..984e78a9 100644 --- a/charts/oam-kubernetes-runtime/crds/core.oam.dev_applicationconfigurations.yaml +++ b/charts/oam-kubernetes-runtime/crds/core.oam.dev_applicationconfigurations.yaml @@ -27,47 +27,31 @@ spec: description: An ApplicationConfiguration represents an OAM application. 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' + 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' + 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: An ApplicationConfigurationSpec defines the desired state - of a ApplicationConfiguration. + description: An ApplicationConfigurationSpec defines the desired state of a ApplicationConfiguration. properties: components: - description: Components of which this ApplicationConfiguration consists. - Each component will be used to instantiate a workload. + description: Components of which this ApplicationConfiguration consists. Each component will be used to instantiate a workload. items: - description: An ApplicationConfigurationComponent specifies a component - of an ApplicationConfiguration. Each component is used to instantiate - a workload. + description: An ApplicationConfigurationComponent specifies a component of an ApplicationConfiguration. Each component is used to instantiate a workload. properties: componentName: - description: ComponentName specifies a component whose latest - revision will be bind with ApplicationConfiguration. When - the spec of the referenced component changes, ApplicationConfiguration - will automatically migrate all trait affect from the prior - revision to the new one. This is mutually exclusive with RevisionName. + description: ComponentName specifies a component whose latest revision will be bind with ApplicationConfiguration. When the spec of the referenced component changes, ApplicationConfiguration will automatically migrate all trait affect from the prior revision to the new one. This is mutually exclusive with RevisionName. type: string dataInputs: - description: DataInputs specify the data input sinks into this - component. + description: DataInputs specify the data input sinks into this component. items: - description: DataInput specifies a data input sink to an object. - If input is array, it will be appended to the target field - paths. + description: DataInput specifies a data input sink to an object. If input is array, it will be appended to the target field paths. properties: toFieldPaths: - description: ToFieldPaths specifies the field paths of - an object to fill passed value. + description: ToFieldPaths specifies the field paths of an object to fill passed value. items: type: string type: array @@ -75,8 +59,7 @@ spec: description: ValueFrom specifies the value source. properties: dataOutputName: - description: DataOutputName matches a name of a DataOutput - in the same AppConfig. + description: DataOutputName matches a name of a DataOutput in the same AppConfig. type: string required: - dataOutputName @@ -84,38 +67,26 @@ spec: type: object type: array dataOutputs: - description: DataOutputs specify the data output sources from - this component. + description: DataOutputs specify the data output sources from this component. items: - description: DataOutput specifies a data output source from - an object. + description: DataOutput specifies a data output source from an object. properties: conditions: - description: Conditions specify the conditions that should - be satisfied before emitting a data output. Different - conditions are AND-ed together. If no conditions is - specified, it is by default to check output value not - empty. + description: Conditions specify the conditions that should be satisfied before emitting a data output. Different conditions are AND-ed together. If no conditions is specified, it is by default to check output value not empty. items: - description: ConditionRequirement specifies the requirement - to match a value. + description: ConditionRequirement specifies the requirement to match a value. properties: fieldPath: - description: FieldPath specifies got value from - workload/trait object + description: FieldPath specifies got value from workload/trait object type: string op: - description: ConditionOperator specifies the operator - to match a value. + description: ConditionOperator specifies the operator to match a value. type: string value: - description: Value specifies an expected value This - is mutually exclusive with ValueFrom + description: Value specifies an expected value This is mutually exclusive with ValueFrom type: string valueFrom: - description: ValueFrom specifies expected value - from AppConfig This is mutually exclusive with - Value + description: ValueFrom specifies expected value from AppConfig This is mutually exclusive with Value properties: fieldPath: type: string @@ -127,23 +98,17 @@ spec: type: object type: array fieldPath: - description: FieldPath refers to the value of an object's - field. + description: FieldPath refers to the value of an object's field. type: string name: - description: Name is the unique name of a DataOutput in - an ApplicationConfiguration. + description: Name is the unique name of a DataOutput in an ApplicationConfiguration. type: string type: object type: array parameterValues: - description: ParameterValues specify values for the the specified - component's parameters. Any parameter required by the component - must be specified. + description: ParameterValues specify values for the the specified component's parameters. Any parameter required by the component must be specified. items: - description: A ComponentParameterValue specifies a value for - a named parameter. The associated component must publish - a parameter with this name. + description: A ComponentParameterValue specifies a value for a named parameter. The associated component must publish a parameter with this name. properties: name: description: Name of the component parameter to set. @@ -160,20 +125,15 @@ spec: type: object type: array revisionName: - description: RevisionName of a specific component revision to - which to bind ApplicationConfiguration. This is mutually exclusive - with componentName. + description: RevisionName of a specific component revision to which to bind ApplicationConfiguration. This is mutually exclusive with componentName. type: string scopes: - description: Scopes in which the specified component should - exist. + description: Scopes in which the specified component should exist. items: - description: A ComponentScope specifies a scope in which a - component should exist. + description: A ComponentScope specifies a scope in which a component should exist. properties: scopeRef: - description: A ScopeReference must refer to an OAM scope - resource. + description: A ScopeReference must refer to an OAM scope resource. properties: apiVersion: description: APIVersion of the referenced object. @@ -199,20 +159,15 @@ spec: traits: description: Traits of the specified component. items: - description: A ComponentTrait specifies a trait that should - be applied to a component. + description: A ComponentTrait specifies a trait that should be applied to a component. properties: dataInputs: - description: DataInputs specify the data input sinks into - this trait. + description: DataInputs specify the data input sinks into this trait. items: - description: DataInput specifies a data input sink to - an object. If input is array, it will be appended - to the target field paths. + description: DataInput specifies a data input sink to an object. If input is array, it will be appended to the target field paths. properties: toFieldPaths: - description: ToFieldPaths specifies the field paths - of an object to fill passed value. + description: ToFieldPaths specifies the field paths of an object to fill passed value. items: type: string type: array @@ -220,8 +175,7 @@ spec: description: ValueFrom specifies the value source. properties: dataOutputName: - description: DataOutputName matches a name of - a DataOutput in the same AppConfig. + description: DataOutputName matches a name of a DataOutput in the same AppConfig. type: string required: - dataOutputName @@ -229,38 +183,26 @@ spec: type: object type: array dataOutputs: - description: DataOutputs specify the data output sources - from this trait. + description: DataOutputs specify the data output sources from this trait. items: - description: DataOutput specifies a data output source - from an object. + description: DataOutput specifies a data output source from an object. properties: conditions: - description: Conditions specify the conditions that - should be satisfied before emitting a data output. - Different conditions are AND-ed together. If no - conditions is specified, it is by default to check - output value not empty. + description: Conditions specify the conditions that should be satisfied before emitting a data output. Different conditions are AND-ed together. If no conditions is specified, it is by default to check output value not empty. items: - description: ConditionRequirement specifies the - requirement to match a value. + description: ConditionRequirement specifies the requirement to match a value. properties: fieldPath: - description: FieldPath specifies got value - from workload/trait object + description: FieldPath specifies got value from workload/trait object type: string op: - description: ConditionOperator specifies the - operator to match a value. + description: ConditionOperator specifies the operator to match a value. type: string value: - description: Value specifies an expected value - This is mutually exclusive with ValueFrom + description: Value specifies an expected value This is mutually exclusive with ValueFrom type: string valueFrom: - description: ValueFrom specifies expected - value from AppConfig This is mutually exclusive - with Value + description: ValueFrom specifies expected value from AppConfig This is mutually exclusive with Value properties: fieldPath: type: string @@ -272,12 +214,10 @@ spec: type: object type: array fieldPath: - description: FieldPath refers to the value of an - object's field. + description: FieldPath refers to the value of an object's field. type: string name: - description: Name is the unique name of a DataOutput - in an ApplicationConfiguration. + description: Name is the unique name of a DataOutput in an ApplicationConfiguration. type: string type: object type: array @@ -296,8 +236,7 @@ spec: - components type: object status: - description: An ApplicationConfigurationStatus represents the observed - state of a ApplicationConfiguration. + description: An ApplicationConfigurationStatus represents the observed state of a ApplicationConfiguration. properties: conditions: description: Conditions of the resource. @@ -305,25 +244,20 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: A Message containing details about this condition's last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from - one status to another. + description: A Reason for this condition's last transition from one status to another. type: string status: - description: Status of this condition; is it currently True, - False, or Unknown? + description: Status of this condition; is it currently True, False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime @@ -333,17 +267,14 @@ spec: type: object type: array dependency: - description: DependencyStatus represents the observed state of the - dependency of an ApplicationConfiguration. + description: DependencyStatus represents the observed state of the dependency of an ApplicationConfiguration. properties: unsatisfied: items: - description: UnstaifiedDependency describes unsatisfied dependency - flow between one pair of objects. + description: UnstaifiedDependency describes unsatisfied dependency flow between one pair of objects. properties: from: - description: DependencyFromObject represents the object - that dependency data comes from. + description: DependencyFromObject represents the object that dependency data comes from. properties: apiVersion: description: APIVersion of the referenced object. @@ -367,8 +298,7 @@ spec: reason: type: string to: - description: DependencyToObject represents the object that - dependency data goes to. + description: DependencyToObject represents the object that dependency data goes to. properties: apiVersion: description: APIVersion of the referenced object. @@ -399,11 +329,9 @@ spec: type: array type: object historyWorkloads: - description: HistoryWorkloads will record history but still working - revision workloads. + description: HistoryWorkloads will record history but still working revision workloads. items: - description: HistoryWorkload contain the old component revision - that are still running + description: HistoryWorkload contain the old component revision that are still running properties: revision: description: Revision of this workload @@ -435,9 +363,7 @@ spec: format: int64 type: integer status: - description: Status is a place holder for a customized controller - to fill if it needs a single place to summarize the status of the - entire application + description: Status is a place holder for a customized controller to fill if it needs a single place to summarize the status of the entire application type: string workloads: description: Workloads created by this ApplicationConfiguration. @@ -453,8 +379,7 @@ spec: scopes: description: Scopes associated with this workload. items: - description: A WorkloadScope represents a scope associated - with a workload and its status + description: A WorkloadScope represents a scope associated with a workload and its status properties: scopeRef: description: Reference to a scope created by an ApplicationConfiguration. @@ -477,33 +402,25 @@ spec: - name type: object status: - description: Status is a place holder for a customized - controller to fill if it needs a single place to summarize - the status of the scope + description: Status is a place holder for a customized controller to fill if it needs a single place to summarize the status of the scope type: string required: - scopeRef type: object type: array status: - description: Status is a place holder for a customized controller - to fill if it needs a single place to summarize the entire - status of the workload + description: Status is a place holder for a customized controller to fill if it needs a single place to summarize the entire status of the workload type: string traits: description: Traits associated with this workload. items: - description: A WorkloadTrait represents a trait associated - with a workload and its status + description: A WorkloadTrait represents a trait associated with a workload and its status properties: message: - description: Message will allow controller to leave some - additional information for this trait + description: Message will allow controller to leave some additional information for this trait type: string status: - description: Status is a place holder for a customized - controller to fill if it needs a single place to summarize - the status of the trait + description: Status is a place holder for a customized controller to fill if it needs a single place to summarize the status of the trait type: string traitRef: description: Reference to a trait created by an ApplicationConfiguration. diff --git a/charts/oam-kubernetes-runtime/crds/core.oam.dev_components.yaml b/charts/oam-kubernetes-runtime/crds/core.oam.dev_components.yaml index 287a8e45..8a2c5465 100644 --- a/charts/oam-kubernetes-runtime/crds/core.oam.dev_components.yaml +++ b/charts/oam-kubernetes-runtime/crds/core.oam.dev_components.yaml @@ -32,14 +32,10 @@ spec: description: A Component describes how an OAM workload kind may be instantiated. 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' + 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' + 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 @@ -47,34 +43,24 @@ spec: description: A ComponentSpec defines the desired state of a Component. properties: parameters: - description: Parameters exposed by this component. ApplicationConfigurations - that reference this component may specify values for these parameters, - which will in turn be injected into the embedded workload. + description: Parameters exposed by this component. ApplicationConfigurations that reference this component may specify values for these parameters, which will in turn be injected into the embedded workload. items: - description: A ComponentParameter defines a configurable parameter - of a component. + description: A ComponentParameter defines a configurable parameter of a component. properties: description: description: Description of this parameter. type: string fieldPaths: - description: FieldPaths specifies an array of fields within - this Component's workload that will be overwritten by the - value of this parameter. The type of the parameter (e.g. int, - string) is inferred from the type of these fields; All fields - must be of the same type. Fields are specified as JSON field - paths without a leading dot, for example 'spec.replicas'. + description: FieldPaths specifies an array of fields within this Component's workload that will be overwritten by the value of this parameter. The type of the parameter (e.g. int, string) is inferred from the type of these fields; All fields must be of the same type. Fields are specified as JSON field paths without a leading dot, for example 'spec.replicas'. items: type: string type: array name: - description: Name of this parameter. OAM ApplicationConfigurations - will specify parameter values using this name. + description: Name of this parameter. OAM ApplicationConfigurations will specify parameter values using this name. type: string required: default: false - description: Required specifies whether or not a value for this - parameter must be supplied when authoring an ApplicationConfiguration. + description: Required specifies whether or not a value for this parameter must be supplied when authoring an ApplicationConfiguration. type: boolean required: - fieldPaths @@ -82,10 +68,7 @@ spec: type: object type: array workload: - description: A Workload that will be created for each ApplicationConfiguration - that includes this Component. Workload is an instance of a workloadDefinition. - We either use the GVK info or a special "type" field in the workload - to associate the content of the workload with its workloadDefinition + description: A Workload that will be created for each ApplicationConfiguration that includes this Component. Workload is an instance of a workloadDefinition. We either use the GVK info or a special "type" field in the workload to associate the content of the workload with its workloadDefinition type: object x-kubernetes-embedded-resource: true x-kubernetes-preserve-unknown-fields: true @@ -101,25 +84,20 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: A Message containing details about this condition's last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from - one status to another. + description: A Reason for this condition's last transition from one status to another. type: string status: - description: Status of this condition; is it currently True, - False, or Unknown? + description: Status of this condition; is it currently True, False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/charts/oam-kubernetes-runtime/crds/core.oam.dev_containerizedworkloads.yaml b/charts/oam-kubernetes-runtime/crds/core.oam.dev_containerizedworkloads.yaml index 8dda551c..b174cb65 100644 --- a/charts/oam-kubernetes-runtime/crds/core.oam.dev_containerizedworkloads.yaml +++ b/charts/oam-kubernetes-runtime/crds/core.oam.dev_containerizedworkloads.yaml @@ -25,20 +25,15 @@ spec: description: A ContainerizedWorkload is a workload that runs OCI containers. 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' + 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' + 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: A ContainerizedWorkloadSpec defines the desired state of - a ContainerizedWorkload. + description: A ContainerizedWorkloadSpec defines the desired state of a ContainerizedWorkload. properties: arch: description: CPUArchitecture required by this workload. @@ -51,12 +46,10 @@ spec: containers: description: Containers of which this workload consists. items: - description: A Container represents an Open Containers Initiative - (OCI) container. + description: A Container represents an Open Containers Initiative (OCI) container. properties: args: - description: Arguments to be passed to the command run by this - container. + description: Arguments to be passed to the command run by this container. items: type: string type: array @@ -66,16 +59,12 @@ spec: type: string type: array config: - description: ConfigFiles that should be written within this - container. + description: ConfigFiles that should be written within this container. items: - description: A ContainerConfigFile specifies a configuration - file that should be written within a container. + description: A ContainerConfigFile specifies a configuration file that should be written within a container. properties: fromSecret: - description: FromSecret is a secret key reference which - can be used to assign a value to be written to the configuration - file at the given path in the container. + description: FromSecret is a secret key reference which can be used to assign a value to be written to the configuration file at the given path in the container. properties: key: description: The key to select. @@ -88,27 +77,22 @@ spec: - name type: object path: - description: Path within the container at which the configuration - file should be written. + description: Path within the container at which the configuration file should be written. type: string value: - description: Value that should be written to the configuration - file. + description: Value that should be written to the configuration file. type: string required: - path type: object type: array env: - description: Environment variables that should be set within - this container. + description: Environment variables that should be set within this container. items: - description: A ContainerEnvVar specifies an environment variable - that should be set within a container. + description: A ContainerEnvVar specifies an environment variable that should be set within a container. properties: fromSecret: - description: FromSecret is a secret key reference which - can be used to assign a value to the environment variable. + description: FromSecret is a secret key reference which can be used to assign a value to the environment variable. properties: key: description: The key to select. @@ -121,9 +105,7 @@ spec: - name type: object name: - description: Name of the environment variable. Must be - composed of valid Unicode letter and number characters, - as well as _ and -. + description: Name of the environment variable. Must be composed of valid Unicode letter and number characters, as well as _ and -. pattern: ^[-_a-zA-Z0-9]+$ type: string value: @@ -134,22 +116,16 @@ spec: type: object type: array image: - description: Image this container should run. Must be a path-like - or URI-like representation of an OCI image. May be prefixed - with a registry address and should be suffixed with a tag. + description: Image this container should run. Must be a path-like or URI-like representation of an OCI image. May be prefixed with a registry address and should be suffixed with a tag. type: string imagePullSecret: - description: ImagePullSecret specifies the name of a Secret - from which the credentials required to pull this container's - image can be loaded. + description: ImagePullSecret specifies the name of a Secret from which the credentials required to pull this container's image can be loaded. type: string livenessProbe: - description: A LivenessProbe assesses whether this container - is alive. Containers that fail liveness probes will be restarted. + description: A LivenessProbe assesses whether this container is alive. Containers that fail liveness probes will be restarted. properties: exec: - description: Exec probes a container's health by executing - a command. + description: Exec probes a container's health by executing a command. properties: command: description: Command to be run by this probe. @@ -160,24 +136,19 @@ spec: - command type: object failureThreshold: - description: FailureThreshold specifies how many consecutive - probes must fail in order for the container to be considered - healthy. + description: FailureThreshold specifies how many consecutive probes must fail in order for the container to be considered healthy. format: int32 type: integer httpGet: - description: HTTPGet probes a container's health by sending - an HTTP GET request. + description: HTTPGet probes a container's health by sending an HTTP GET request. properties: httpHeaders: description: HTTPHeaders to send with the GET request. items: - description: A HTTPHeader to be passed when probing - a container. + description: A HTTPHeader to be passed when probing a container. properties: name: - description: Name of this HTTP header. Must be - unique per probe. + description: Name of this HTTP header. Must be unique per probe. type: string value: description: Value of this HTTP header. @@ -199,8 +170,7 @@ spec: - port type: object initialDelaySeconds: - description: InitialDelaySeconds after a container starts - before the first probe. + description: InitialDelaySeconds after a container starts before the first probe. format: int32 type: integer periodSeconds: @@ -208,14 +178,11 @@ spec: format: int32 type: integer successThreshold: - description: SuccessThreshold specifies how many consecutive - probes must success in order for the container to be considered - healthy. + description: SuccessThreshold specifies how many consecutive probes must success in order for the container to be considered healthy. format: int32 type: integer tcpSocket: - description: TCPSocketProbe probes a container's health - by connecting to a TCP socket. + description: TCPSocketProbe probes a container's health by connecting to a TCP socket. properties: port: description: Port this probe should connect to. @@ -225,33 +192,28 @@ spec: - port type: object timeoutSeconds: - description: TimeoutSeconds after which the probe times - out. + description: TimeoutSeconds after which the probe times out. format: int32 type: integer type: object name: - description: Name of this container. Must be unique within its - workload. + description: Name of this container. Must be unique within its workload. type: string ports: description: Ports exposed by this container. items: - description: A ContainerPort specifies a port that is exposed - by a container. + description: A ContainerPort specifies a port that is exposed by a container. properties: containerPort: description: Port number. Must be unique within its container. format: int32 type: integer name: - description: Name of this port. Must be unique within - its container. Must be lowercase alphabetical characters. + description: Name of this port. Must be unique within its container. Must be lowercase alphabetical characters. pattern: ^[a-z]+$ type: string protocol: - description: Protocol used by the server listening on - this port. + description: Protocol used by the server listening on this port. enum: - TCP - UDP @@ -262,13 +224,10 @@ spec: type: object type: array readinessProbe: - description: A ReadinessProbe assesses whether this container - is ready to serve requests. Containers that fail readiness - probes will be withdrawn from service. + description: A ReadinessProbe assesses whether this container is ready to serve requests. Containers that fail readiness probes will be withdrawn from service. properties: exec: - description: Exec probes a container's health by executing - a command. + description: Exec probes a container's health by executing a command. properties: command: description: Command to be run by this probe. @@ -279,24 +238,19 @@ spec: - command type: object failureThreshold: - description: FailureThreshold specifies how many consecutive - probes must fail in order for the container to be considered - healthy. + description: FailureThreshold specifies how many consecutive probes must fail in order for the container to be considered healthy. format: int32 type: integer httpGet: - description: HTTPGet probes a container's health by sending - an HTTP GET request. + description: HTTPGet probes a container's health by sending an HTTP GET request. properties: httpHeaders: description: HTTPHeaders to send with the GET request. items: - description: A HTTPHeader to be passed when probing - a container. + description: A HTTPHeader to be passed when probing a container. properties: name: - description: Name of this HTTP header. Must be - unique per probe. + description: Name of this HTTP header. Must be unique per probe. type: string value: description: Value of this HTTP header. @@ -318,8 +272,7 @@ spec: - port type: object initialDelaySeconds: - description: InitialDelaySeconds after a container starts - before the first probe. + description: InitialDelaySeconds after a container starts before the first probe. format: int32 type: integer periodSeconds: @@ -327,14 +280,11 @@ spec: format: int32 type: integer successThreshold: - description: SuccessThreshold specifies how many consecutive - probes must success in order for the container to be considered - healthy. + description: SuccessThreshold specifies how many consecutive probes must success in order for the container to be considered healthy. format: int32 type: integer tcpSocket: - description: TCPSocketProbe probes a container's health - by connecting to a TCP socket. + description: TCPSocketProbe probes a container's health by connecting to a TCP socket. properties: port: description: Port this probe should connect to. @@ -344,8 +294,7 @@ spec: - port type: object timeoutSeconds: - description: TimeoutSeconds after which the probe times - out. + description: TimeoutSeconds after which the probe times out. format: int32 type: integer type: object @@ -356,8 +305,7 @@ spec: description: CPU required by this container. properties: required: - description: Required CPU count. 1.0 represents one - CPU core. + description: Required CPU count. 1.0 represents one CPU core. type: string required: - required @@ -368,16 +316,13 @@ spec: description: ExtendedResource required by a container. properties: name: - description: Name of the external resource. Resource - names are specified in kind.group/version format, - e.g. motionsensor.ext.example.com/v1. + description: Name of the external resource. Resource names are specified in kind.group/version format, e.g. motionsensor.ext.example.com/v1. type: string required: anyOf: - type: integer - type: string - description: Required extended resource(s), e.g. 8 - or "very-cool-widget" + description: Required extended resource(s), e.g. 8 or "very-cool-widget" x-kubernetes-int-or-string: true required: - name @@ -408,8 +353,7 @@ spec: description: VolumeResource required by a container. properties: accessMode: - description: AccessMode of this volume; RO (read only) - or RW (read and write). + description: AccessMode of this volume; RO (read only) or RW (read and write). enum: - RO - RW @@ -418,8 +362,7 @@ spec: description: Disk requirements of this volume. properties: ephemeral: - description: Ephemeral specifies whether an external - disk needs to be mounted. + description: Ephemeral specifies whether an external disk needs to be mounted. type: boolean required: description: Required disk space. @@ -428,16 +371,13 @@ spec: - required type: object mountPath: - description: MountPath at which this volume will be - mounted within its container. + description: MountPath at which this volume will be mounted within its container. type: string name: - description: Name of this volume. Must be unique within - its container. + description: Name of this volume. Must be unique within its container. type: string sharingPolicy: - description: SharingPolicy of this volume; Exclusive - or Shared. + description: SharingPolicy of this volume; Exclusive or Shared. enum: - Exclusive - Shared @@ -466,8 +406,7 @@ spec: - containers type: object status: - description: A ContainerizedWorkloadStatus represents the observed state - of a ContainerizedWorkload. + description: A ContainerizedWorkloadStatus represents the observed state of a ContainerizedWorkload. properties: conditions: description: Conditions of the resource. @@ -475,25 +414,20 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: A Message containing details about this condition's last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from - one status to another. + description: A Reason for this condition's last transition from one status to another. type: string status: - description: Status of this condition; is it currently True, - False, or Unknown? + description: Status of this condition; is it currently True, False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime @@ -505,9 +439,7 @@ spec: resources: description: Resources managed by this containerised workload. items: - description: A TypedReference refers to an object by Name, Kind, - and APIVersion. It is commonly used to reference cluster-scoped - objects or objects where the namespace is already known. + description: A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known. properties: apiVersion: description: APIVersion of the referenced object. diff --git a/charts/oam-kubernetes-runtime/crds/core.oam.dev_healthscopes.yaml b/charts/oam-kubernetes-runtime/crds/core.oam.dev_healthscopes.yaml index 5310a5a9..baae9f5f 100644 --- a/charts/oam-kubernetes-runtime/crds/core.oam.dev_healthscopes.yaml +++ b/charts/oam-kubernetes-runtime/crds/core.oam.dev_healthscopes.yaml @@ -26,18 +26,13 @@ spec: name: v1alpha2 schema: openAPIV3Schema: - description: A HealthScope determines an aggregate health status based of - the health of components. + description: A HealthScope determines an aggregate health status based of the health of components. 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' + 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' + 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 @@ -45,22 +40,17 @@ spec: description: A HealthScopeSpec defines the desired state of a HealthScope. properties: probe-interval: - description: ProbeInterval is the amount of time in seconds between - probing tries. + description: ProbeInterval is the amount of time in seconds between probing tries. format: int32 type: integer probe-timeout: - description: ProbeTimeout is the amount of time in seconds to wait - when receiving a response before marked failure. + description: ProbeTimeout is the amount of time in seconds to wait when receiving a response before marked failure. format: int32 type: integer workloadRefs: - description: WorkloadReferences to the workloads that are in this - scope. + description: WorkloadReferences to the workloads that are in this scope. items: - description: A TypedReference refers to an object by Name, Kind, - and APIVersion. It is commonly used to reference cluster-scoped - objects or objects where the namespace is already known. + description: A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known. properties: apiVersion: description: APIVersion of the referenced object. @@ -92,25 +82,20 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: A Message containing details about this condition's last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from - one status to another. + description: A Reason for this condition's last transition from one status to another. type: string status: - description: Status of this condition; is it currently True, - False, or Unknown? + description: Status of this condition; is it currently True, False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime @@ -120,15 +105,12 @@ spec: type: object type: array healthConditions: - description: WorkloadHealthConditions represents health condition - of workloads in the scope + description: WorkloadHealthConditions represents health condition of workloads in the scope items: - description: WorkloadHealthCondition represents informative health - condition. + description: WorkloadHealthCondition represents informative health condition. properties: componentName: - description: ComponentName represents the component name if - target is a workload + description: ComponentName represents the component name if target is a workload type: string diagnosis: type: string @@ -136,9 +118,7 @@ spec: description: HealthStatus represents health status strings. type: string targetWorkload: - description: A TypedReference refers to an object by Name, Kind, - and APIVersion. It is commonly used to reference cluster-scoped - objects or objects where the namespace is already known. + description: A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known. properties: apiVersion: description: APIVersion of the referenced object. @@ -158,16 +138,14 @@ spec: - name type: object workloadStatus: - description: WorkloadStatus represents status of workloads whose - HealthStatus is UNKNOWN. + description: WorkloadStatus represents status of workloads whose HealthStatus is UNKNOWN. type: string required: - healthStatus type: object type: array scopeHealthCondition: - description: ScopeHealthCondition represents health condition summary - of the scope + description: ScopeHealthCondition represents health condition summary of the scope properties: healthStatus: description: HealthStatus represents health status strings. diff --git a/charts/oam-kubernetes-runtime/crds/core.oam.dev_manualscalertraits.yaml b/charts/oam-kubernetes-runtime/crds/core.oam.dev_manualscalertraits.yaml index 8dfca3fa..3e1b4ac8 100644 --- a/charts/oam-kubernetes-runtime/crds/core.oam.dev_manualscalertraits.yaml +++ b/charts/oam-kubernetes-runtime/crds/core.oam.dev_manualscalertraits.yaml @@ -22,18 +22,13 @@ spec: - name: v1alpha2 schema: openAPIV3Schema: - description: A ManualScalerTrait determines how many replicas a workload should - have. + description: A ManualScalerTrait determines how many replicas a workload should have. 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' + 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' + 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 @@ -45,8 +40,7 @@ spec: format: int32 type: integer workloadRef: - description: WorkloadReference to the workload this trait applies - to. + description: WorkloadReference to the workload this trait applies to. properties: apiVersion: description: APIVersion of the referenced object. @@ -70,8 +64,7 @@ spec: - workloadRef type: object status: - description: A ManualScalerTraitStatus represents the observed state of - a ManualScalerTrait. + description: A ManualScalerTraitStatus represents the observed state of a ManualScalerTrait. properties: conditions: description: Conditions of the resource. @@ -79,25 +72,20 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: A Message containing details about this condition's last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from - one status to another. + description: A Reason for this condition's last transition from one status to another. type: string status: - description: Status of this condition; is it currently True, - False, or Unknown? + description: Status of this condition; is it currently True, False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/charts/oam-kubernetes-runtime/crds/core.oam.dev_scopedefinitions.yaml b/charts/oam-kubernetes-runtime/crds/core.oam.dev_scopedefinitions.yaml index 1fb71858..c64acc56 100644 --- a/charts/oam-kubernetes-runtime/crds/core.oam.dev_scopedefinitions.yaml +++ b/charts/oam-kubernetes-runtime/crds/core.oam.dev_scopedefinitions.yaml @@ -26,20 +26,13 @@ spec: name: v1alpha2 schema: openAPIV3Schema: - description: A ScopeDefinition registers a kind of Kubernetes custom resource - as a valid OAM scope kind by referencing its CustomResourceDefinition. The - CRD is used to validate the schema of the scope when it is embedded in an - OAM ApplicationConfiguration. + description: A ScopeDefinition registers a kind of Kubernetes custom resource as a valid OAM scope kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the scope when it is embedded in an OAM ApplicationConfiguration. 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' + 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' + 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 @@ -47,32 +40,26 @@ spec: description: A ScopeDefinitionSpec defines the desired state of a ScopeDefinition. properties: allowComponentOverlap: - description: AllowComponentOverlap specifies whether an OAM component - may exist in multiple instances of this kind of scope. + description: AllowComponentOverlap specifies whether an OAM component may exist in multiple instances of this kind of scope. type: boolean definitionRef: - description: Reference to the CustomResourceDefinition that defines - this scope kind. + description: Reference to the CustomResourceDefinition that defines this scope kind. properties: name: description: Name of the referenced CustomResourceDefinition. type: string version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified + description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified type: string required: - name type: object extension: - description: Extension is used for extension needs by OAM platform - builders + description: Extension is used for extension needs by OAM platform builders type: object x-kubernetes-preserve-unknown-fields: true workloadRefsPath: - description: WorkloadRefsPath indicates if/where a scope accepts workloadRef - objects + description: WorkloadRefsPath indicates if/where a scope accepts workloadRef objects type: string required: - allowComponentOverlap diff --git a/charts/oam-kubernetes-runtime/crds/core.oam.dev_traitdefinitions.yaml b/charts/oam-kubernetes-runtime/crds/core.oam.dev_traitdefinitions.yaml index 6e818eac..a88b261e 100644 --- a/charts/oam-kubernetes-runtime/crds/core.oam.dev_traitdefinitions.yaml +++ b/charts/oam-kubernetes-runtime/crds/core.oam.dev_traitdefinitions.yaml @@ -26,20 +26,13 @@ spec: name: v1alpha2 schema: openAPIV3Schema: - description: A TraitDefinition registers a kind of Kubernetes custom resource - as a valid OAM trait kind by referencing its CustomResourceDefinition. The - CRD is used to validate the schema of the trait when it is embedded in an - OAM ApplicationConfiguration. + description: A TraitDefinition registers a kind of Kubernetes custom resource as a valid OAM trait kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the trait when it is embedded in an OAM ApplicationConfiguration. 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' + 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' + 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 @@ -47,40 +40,31 @@ spec: description: A TraitDefinitionSpec defines the desired state of a TraitDefinition. properties: appliesToWorkloads: - description: AppliesToWorkloads specifies the list of workload kinds - this trait applies to. Workload kinds are specified in kind.group/version - format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this - field apply to all workload kinds. + description: AppliesToWorkloads specifies the list of workload kinds this trait applies to. Workload kinds are specified in kind.group/version format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to all workload kinds. items: type: string type: array definitionRef: - description: Reference to the CustomResourceDefinition that defines - this trait kind. + description: Reference to the CustomResourceDefinition that defines this trait kind. properties: name: description: Name of the referenced CustomResourceDefinition. type: string version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified + description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified type: string required: - name type: object extension: - description: Extension is used for extension needs by OAM platform - builders + description: Extension is used for extension needs by OAM platform builders type: object x-kubernetes-preserve-unknown-fields: true revisionEnabled: - description: Revision indicates whether a trait is aware of component - revision + description: Revision indicates whether a trait is aware of component revision type: boolean workloadRefPath: - description: WorkloadRefPath indicates where/if a trait accepts a - workloadRef object + description: WorkloadRefPath indicates where/if a trait accepts a workloadRef object type: string required: - definitionRef diff --git a/charts/oam-kubernetes-runtime/crds/core.oam.dev_workloaddefinitions.yaml b/charts/oam-kubernetes-runtime/crds/core.oam.dev_workloaddefinitions.yaml index 16f6b4f4..404a5a2e 100644 --- a/charts/oam-kubernetes-runtime/crds/core.oam.dev_workloaddefinitions.yaml +++ b/charts/oam-kubernetes-runtime/crds/core.oam.dev_workloaddefinitions.yaml @@ -26,20 +26,13 @@ spec: name: v1alpha2 schema: openAPIV3Schema: - description: A WorkloadDefinition registers a kind of Kubernetes custom resource - as a valid OAM workload kind by referencing its CustomResourceDefinition. - The CRD is used to validate the schema of the workload when it is embedded - in an OAM Component. + description: A WorkloadDefinition registers a kind of Kubernetes custom resource as a valid OAM workload kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the workload when it is embedded in an OAM Component. 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' + 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' + 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 @@ -47,11 +40,9 @@ spec: description: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition. properties: childResourceKinds: - description: ChildResourceKinds are the list of GVK of the child resources - this workload generates + description: ChildResourceKinds are the list of GVK of the child resources this workload generates items: - description: A ChildResourceKind defines a child Kubernetes resource - kind with a selector + description: A ChildResourceKind defines a child Kubernetes resource kind with a selector properties: apiVersion: description: APIVersion of the child resource @@ -62,8 +53,7 @@ spec: selector: additionalProperties: type: string - description: Selector to select the child resources that the - workload wants to expose to traits + description: Selector to select the child resources that the workload wants to expose to traits type: object required: - apiVersion @@ -71,34 +61,26 @@ spec: type: object type: array definitionRef: - description: Reference to the CustomResourceDefinition that defines - this workload kind. + description: Reference to the CustomResourceDefinition that defines this workload kind. properties: name: description: Name of the referenced CustomResourceDefinition. type: string version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified + description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified type: string required: - name type: object extension: - description: Extension is used for extension needs by OAM platform - builders + description: Extension is used for extension needs by OAM platform builders type: object x-kubernetes-preserve-unknown-fields: true podSpecPath: - description: PodSpecPath indicates where/if this workload has K8s - podSpec field if one workload has podSpec, trait can do lot's of - assumption such as port, env, volume fields. + description: PodSpecPath indicates where/if this workload has K8s podSpec field if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields. type: string revisionLabel: - description: RevisionLabel indicates which label for underlying resources(e.g. - pods) of this workload can be used by trait to create resource selectors(e.g. - label selector for pods). + description: RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload can be used by trait to create resource selectors(e.g. label selector for pods). type: string required: - definitionRef diff --git a/go.mod b/go.mod index 19624fd9..55942568 100644 --- a/go.mod +++ b/go.mod @@ -3,27 +3,33 @@ module github.com/crossplane/oam-kubernetes-runtime go 1.13 require ( - github.com/crossplane/crossplane-runtime v0.8.0 + github.com/Azure/go-autorest/autorest v0.9.2 // indirect + github.com/Azure/go-autorest/autorest/adal v0.8.0 // indirect + github.com/crossplane/crossplane-runtime v0.10.0 github.com/davecgh/go-spew v1.1.1 github.com/ghodss/yaml v1.0.0 github.com/go-logr/logr v0.1.0 + github.com/go-logr/zapr v0.1.1 // indirect + github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect github.com/google/go-cmp v0.4.0 - github.com/json-iterator/go v1.1.8 - github.com/onsi/ginkgo v1.11.0 - github.com/onsi/gomega v1.8.1 + github.com/gophercloud/gophercloud v0.6.0 // indirect + github.com/json-iterator/go v1.1.10 + github.com/onsi/ginkgo v1.12.1 + github.com/onsi/gomega v1.10.1 github.com/pkg/errors v0.9.1 + github.com/prometheus/client_golang v1.1.0 // indirect github.com/stretchr/testify v1.4.0 go.uber.org/zap v1.10.0 golang.org/x/tools v0.0.0-20200630223951-c138986dd9b9 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 - k8s.io/api v0.18.5 - k8s.io/apiextensions-apiserver v0.18.2 - k8s.io/apimachinery v0.18.5 - k8s.io/client-go v0.18.5 + k8s.io/api v0.18.6 + k8s.io/apiextensions-apiserver v0.18.6 + k8s.io/apimachinery v0.18.6 + k8s.io/client-go v0.18.6 k8s.io/klog v1.0.0 k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 k8s.io/kubectl v0.18.5 - k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 - sigs.k8s.io/controller-runtime v0.6.0 + k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 + sigs.k8s.io/controller-runtime v0.6.2 sigs.k8s.io/controller-tools v0.2.4 ) diff --git a/go.sum b/go.sum index d293ee6d..600a1dc1 100644 --- a/go.sum +++ b/go.sum @@ -39,9 +39,7 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -74,10 +72,8 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/crossplane/crossplane-runtime v0.8.0 h1:IBm5LWVeqB2BjHpkykURHY0PSozXWfIXk7LfWtr27wY= -github.com/crossplane/crossplane-runtime v0.8.0/go.mod h1:gNY/21MLBaz5KNP7hmfXbBXp8reYRbwY5B/97Kp4tgM= -github.com/crossplane/crossplane-tools v0.0.0-20200219001116-bb8b2ce46330/go.mod h1:C735A9X0x0lR8iGVOOxb49Mt70Ua4EM2b7PGaRPBLd4= -github.com/dave/jennifer v1.3.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= +github.com/crossplane/crossplane-runtime v0.10.0 h1:H8YvMcrm1uzZYpwU/BpxjRQfceVulxgYJMx4rmX38Hg= +github.com/crossplane/crossplane-runtime v0.10.0/go.mod h1:cJl5ZZONisre4v6wTmbrC8Jh3AI+erq/lNaxZzv9tnU= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -108,6 +104,8 @@ github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -190,6 +188,13 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= @@ -240,15 +245,14 @@ github.com/hashicorp/go-version v1.1.0 h1:bPIoEKD27tNdebFGGxxYwcL4nepeY4j1QP23PF github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= -github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= +github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 h1:12VvqtR6Aowv3l/EQUlocDHW2Cp4G9WJVH7uyH8QFJE= @@ -259,6 +263,8 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -310,17 +316,22 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -352,6 +363,8 @@ github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -459,6 +472,8 @@ golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= @@ -490,13 +505,21 @@ golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 h1:HmbHVPwrPEKPGLAcHSrMe6+hqSUlvZU0rab6x5EXfGU= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= @@ -559,6 +582,13 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -583,6 +613,8 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966 h1:B0J02caTR6tpSJozBJyiAzT6CtBzjclw4pgm9gg8Ys0= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= @@ -591,29 +623,32 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.0.0-20190918155943-95b840bb6a1f/go.mod h1:uWuOHnjmNrtQomJrvEBg0c0HRNyQ+8KTEERVsK0PW48= -k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= k8s.io/api v0.18.5 h1:fKbCxr+U3fu7k6jB+QeYPD/c6xKYeSJ2KVWmyUypuWM= k8s.io/api v0.18.5/go.mod h1:tN+e/2nbdGKOAH55NMV8oGrMG+3uRlA9GaRfvnCCSNk= +k8s.io/api v0.18.6 h1:osqrAXbOQjkKIWDTjrqxWQ3w0GkKb1KA1XkUGHHYpeE= +k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783/go.mod h1:xvae1SZB3E17UpV59AWc271W/Ph25N+bjPyR63X6tPY= -k8s.io/apiextensions-apiserver v0.18.2 h1:I4v3/jAuQC+89L3Z7dDgAiN4EOjN6sbm6iBqQwHTah8= -k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= +k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= +k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655/go.mod h1:nL6pwRT8NgfF8TT68DBI8uEePRt89cSvoXUVqbkWHq4= -k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apimachinery v0.18.5 h1:Lh6tgsM9FMkC12K5T5QjRm7rDs6aQN5JHkA0JomULDM= k8s.io/apimachinery v0.18.5/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apimachinery v0.18.6 h1:RtFHnfGNfd1N0LeSrKCUznz5xtUP1elRGvHJbL3Ntag= +k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad/go.mod h1:XPCXEwhjaFN29a8NldXA901ElnKeKLrLtREO9ZhFyhg= -k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= +k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/cli-runtime v0.18.5/go.mod h1:uS210tk6ngtwwIJctPLs4ul1r7XlrEtwh9dA1oB700A= k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90/go.mod h1:J69/JveO6XESwVgG53q3Uz5OSfgsv4uxpScmmyYOOlk= -k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= k8s.io/client-go v0.18.5 h1:cLhGZdOmyPhwtt20Lrb7uAqxxB1uvY+NTmNJvno1oKA= k8s.io/client-go v0.18.5/go.mod h1:EsiD+7Fx+bRckKWZXnAXRKKetm1WuzPagH4iOSC8x58= +k8s.io/client-go v0.18.6 h1:I+oWqJbibLSGsZj8Xs8F0aWVXJVIoUHWaaJV3kUN/Zw= +k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE= -k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.5/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/component-base v0.0.0-20190918160511-547f6c5d7090/go.mod h1:933PBGtQFJky3TEwYx4aEPZ4IxqhWh3R6DCmzqIn1hA= -k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/component-base v0.18.5/go.mod h1:RSbcboNk4B+S8Acs2JaBOVW3XNz1+A637s2jL+QQrlU= +k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -622,8 +657,9 @@ k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0 h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kubectl v0.18.5 h1:htctXnWqcF1VBkuzbWINqnwx/rM7byH9o2ZuHntlbJo= @@ -632,6 +668,8 @@ k8s.io/metrics v0.18.5/go.mod h1:pqn6YiCCxUt067ivZVo4KtvppvdykV6HHG5+7ygVkNg= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7MpmSnvtrOieolJKoE= +k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= @@ -639,8 +677,8 @@ modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/controller-runtime v0.6.0 h1:Fzna3DY7c4BIP6KwfSlrfnj20DJ+SeMBK8HSFvOk9NM= -sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2cftPHndTroo= +sigs.k8s.io/controller-runtime v0.6.2 h1:jkAnfdTYBpFwlmBn3pS5HFO06SfxvnTZ1p5PeEF/zAA= +sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E= sigs.k8s.io/controller-tools v0.2.4 h1:la1h46EzElvWefWLqfsXrnsO3lZjpkI0asTpX6h8PLA= sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= diff --git a/legacy/crds/core.oam.dev_applicationconfigurations.yaml b/legacy/crds/core.oam.dev_applicationconfigurations.yaml index 898094e2..582f9999 100644 --- a/legacy/crds/core.oam.dev_applicationconfigurations.yaml +++ b/legacy/crds/core.oam.dev_applicationconfigurations.yaml @@ -27,47 +27,31 @@ spec: description: An ApplicationConfiguration represents an OAM application. 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' + 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' + 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: An ApplicationConfigurationSpec defines the desired state of - a ApplicationConfiguration. + description: An ApplicationConfigurationSpec defines the desired state of a ApplicationConfiguration. properties: components: - description: Components of which this ApplicationConfiguration consists. - Each component will be used to instantiate a workload. + description: Components of which this ApplicationConfiguration consists. Each component will be used to instantiate a workload. items: - description: An ApplicationConfigurationComponent specifies a component - of an ApplicationConfiguration. Each component is used to instantiate - a workload. + description: An ApplicationConfigurationComponent specifies a component of an ApplicationConfiguration. Each component is used to instantiate a workload. properties: componentName: - description: ComponentName specifies a component whose latest - revision will be bind with ApplicationConfiguration. When the - spec of the referenced component changes, ApplicationConfiguration - will automatically migrate all trait affect from the prior revision - to the new one. This is mutually exclusive with RevisionName. + description: ComponentName specifies a component whose latest revision will be bind with ApplicationConfiguration. When the spec of the referenced component changes, ApplicationConfiguration will automatically migrate all trait affect from the prior revision to the new one. This is mutually exclusive with RevisionName. type: string dataInputs: - description: DataInputs specify the data input sinks into this - component. + description: DataInputs specify the data input sinks into this component. items: - description: DataInput specifies a data input sink to an object. - If input is array, it will be appended to the target field - paths. + description: DataInput specifies a data input sink to an object. If input is array, it will be appended to the target field paths. properties: toFieldPaths: - description: ToFieldPaths specifies the field paths of an - object to fill passed value. + description: ToFieldPaths specifies the field paths of an object to fill passed value. items: type: string type: array @@ -75,8 +59,7 @@ spec: description: ValueFrom specifies the value source. properties: dataOutputName: - description: DataOutputName matches a name of a DataOutput - in the same AppConfig. + description: DataOutputName matches a name of a DataOutput in the same AppConfig. type: string required: - dataOutputName @@ -84,36 +67,26 @@ spec: type: object type: array dataOutputs: - description: DataOutputs specify the data output sources from - this component. + description: DataOutputs specify the data output sources from this component. items: - description: DataOutput specifies a data output source from - an object. + description: DataOutput specifies a data output source from an object. properties: conditions: - description: Conditions specify the conditions that should - be satisfied before emitting a data output. Different - conditions are AND-ed together. If no conditions is specified, - it is by default to check output value not empty. + description: Conditions specify the conditions that should be satisfied before emitting a data output. Different conditions are AND-ed together. If no conditions is specified, it is by default to check output value not empty. items: - description: ConditionRequirement specifies the requirement - to match a value. + description: ConditionRequirement specifies the requirement to match a value. properties: fieldPath: - description: FieldPath specifies got value from workload/trait - object + description: FieldPath specifies got value from workload/trait object type: string op: - description: ConditionOperator specifies the operator - to match a value. + description: ConditionOperator specifies the operator to match a value. type: string value: - description: Value specifies an expected value This - is mutually exclusive with ValueFrom + description: Value specifies an expected value This is mutually exclusive with ValueFrom type: string valueFrom: - description: ValueFrom specifies expected value from - AppConfig This is mutually exclusive with Value + description: ValueFrom specifies expected value from AppConfig This is mutually exclusive with Value properties: fieldPath: type: string @@ -125,23 +98,17 @@ spec: type: object type: array fieldPath: - description: FieldPath refers to the value of an object's - field. + description: FieldPath refers to the value of an object's field. type: string name: - description: Name is the unique name of a DataOutput in - an ApplicationConfiguration. + description: Name is the unique name of a DataOutput in an ApplicationConfiguration. type: string type: object type: array parameterValues: - description: ParameterValues specify values for the the specified - component's parameters. Any parameter required by the component - must be specified. + description: ParameterValues specify values for the the specified component's parameters. Any parameter required by the component must be specified. items: - description: A ComponentParameterValue specifies a value for - a named parameter. The associated component must publish a - parameter with this name. + description: A ComponentParameterValue specifies a value for a named parameter. The associated component must publish a parameter with this name. properties: name: description: Name of the component parameter to set. @@ -158,19 +125,15 @@ spec: type: object type: array revisionName: - description: RevisionName of a specific component revision to - which to bind ApplicationConfiguration. This is mutually exclusive - with componentName. + description: RevisionName of a specific component revision to which to bind ApplicationConfiguration. This is mutually exclusive with componentName. type: string scopes: description: Scopes in which the specified component should exist. items: - description: A ComponentScope specifies a scope in which a component - should exist. + description: A ComponentScope specifies a scope in which a component should exist. properties: scopeRef: - description: A ScopeReference must refer to an OAM scope - resource. + description: A ScopeReference must refer to an OAM scope resource. properties: apiVersion: description: APIVersion of the referenced object. @@ -196,20 +159,15 @@ spec: traits: description: Traits of the specified component. items: - description: A ComponentTrait specifies a trait that should - be applied to a component. + description: A ComponentTrait specifies a trait that should be applied to a component. properties: dataInputs: - description: DataInputs specify the data input sinks into - this trait. + description: DataInputs specify the data input sinks into this trait. items: - description: DataInput specifies a data input sink to - an object. If input is array, it will be appended to - the target field paths. + description: DataInput specifies a data input sink to an object. If input is array, it will be appended to the target field paths. properties: toFieldPaths: - description: ToFieldPaths specifies the field paths - of an object to fill passed value. + description: ToFieldPaths specifies the field paths of an object to fill passed value. items: type: string type: array @@ -217,8 +175,7 @@ spec: description: ValueFrom specifies the value source. properties: dataOutputName: - description: DataOutputName matches a name of - a DataOutput in the same AppConfig. + description: DataOutputName matches a name of a DataOutput in the same AppConfig. type: string required: - dataOutputName @@ -226,38 +183,26 @@ spec: type: object type: array dataOutputs: - description: DataOutputs specify the data output sources - from this trait. + description: DataOutputs specify the data output sources from this trait. items: - description: DataOutput specifies a data output source - from an object. + description: DataOutput specifies a data output source from an object. properties: conditions: - description: Conditions specify the conditions that - should be satisfied before emitting a data output. - Different conditions are AND-ed together. If no - conditions is specified, it is by default to check - output value not empty. + description: Conditions specify the conditions that should be satisfied before emitting a data output. Different conditions are AND-ed together. If no conditions is specified, it is by default to check output value not empty. items: - description: ConditionRequirement specifies the - requirement to match a value. + description: ConditionRequirement specifies the requirement to match a value. properties: fieldPath: - description: FieldPath specifies got value from - workload/trait object + description: FieldPath specifies got value from workload/trait object type: string op: - description: ConditionOperator specifies the - operator to match a value. + description: ConditionOperator specifies the operator to match a value. type: string value: - description: Value specifies an expected value - This is mutually exclusive with ValueFrom + description: Value specifies an expected value This is mutually exclusive with ValueFrom type: string valueFrom: - description: ValueFrom specifies expected value - from AppConfig This is mutually exclusive - with Value + description: ValueFrom specifies expected value from AppConfig This is mutually exclusive with Value properties: fieldPath: type: string @@ -269,12 +214,10 @@ spec: type: object type: array fieldPath: - description: FieldPath refers to the value of an object's - field. + description: FieldPath refers to the value of an object's field. type: string name: - description: Name is the unique name of a DataOutput - in an ApplicationConfiguration. + description: Name is the unique name of a DataOutput in an ApplicationConfiguration. type: string type: object type: array @@ -293,8 +236,7 @@ spec: - components type: object status: - description: An ApplicationConfigurationStatus represents the observed state - of a ApplicationConfiguration. + description: An ApplicationConfigurationStatus represents the observed state of a ApplicationConfiguration. properties: conditions: description: Conditions of the resource. @@ -302,25 +244,20 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: A Message containing details about this condition's last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from - one status to another. + description: A Reason for this condition's last transition from one status to another. type: string status: - description: Status of this condition; is it currently True, False, - or Unknown? + description: Status of this condition; is it currently True, False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime @@ -330,17 +267,14 @@ spec: type: object type: array dependency: - description: DependencyStatus represents the observed state of the dependency - of an ApplicationConfiguration. + description: DependencyStatus represents the observed state of the dependency of an ApplicationConfiguration. properties: unsatisfied: items: - description: UnstaifiedDependency describes unsatisfied dependency - flow between one pair of objects. + description: UnstaifiedDependency describes unsatisfied dependency flow between one pair of objects. properties: from: - description: DependencyFromObject represents the object that - dependency data comes from. + description: DependencyFromObject represents the object that dependency data comes from. properties: apiVersion: description: APIVersion of the referenced object. @@ -364,8 +298,7 @@ spec: reason: type: string to: - description: DependencyToObject represents the object that - dependency data goes to. + description: DependencyToObject represents the object that dependency data goes to. properties: apiVersion: description: APIVersion of the referenced object. @@ -396,11 +329,9 @@ spec: type: array type: object historyWorkloads: - description: HistoryWorkloads will record history but still working - revision workloads. + description: HistoryWorkloads will record history but still working revision workloads. items: - description: HistoryWorkload contain the old component revision that - are still running + description: HistoryWorkload contain the old component revision that are still running properties: revision: description: Revision of this workload @@ -432,9 +363,7 @@ spec: format: int64 type: integer status: - description: Status is a place holder for a customized controller to - fill if it needs a single place to summarize the status of the entire - application + description: Status is a place holder for a customized controller to fill if it needs a single place to summarize the status of the entire application type: string workloads: description: Workloads created by this ApplicationConfiguration. @@ -450,8 +379,7 @@ spec: scopes: description: Scopes associated with this workload. items: - description: A WorkloadScope represents a scope associated with - a workload and its status + description: A WorkloadScope represents a scope associated with a workload and its status properties: scopeRef: description: Reference to a scope created by an ApplicationConfiguration. @@ -474,33 +402,25 @@ spec: - name type: object status: - description: Status is a place holder for a customized controller - to fill if it needs a single place to summarize the status - of the scope + description: Status is a place holder for a customized controller to fill if it needs a single place to summarize the status of the scope type: string required: - scopeRef type: object type: array status: - description: Status is a place holder for a customized controller - to fill if it needs a single place to summarize the entire status - of the workload + description: Status is a place holder for a customized controller to fill if it needs a single place to summarize the entire status of the workload type: string traits: description: Traits associated with this workload. items: - description: A WorkloadTrait represents a trait associated with - a workload and its status + description: A WorkloadTrait represents a trait associated with a workload and its status properties: message: - description: Message will allow controller to leave some - additional information for this trait + description: Message will allow controller to leave some additional information for this trait type: string status: - description: Status is a place holder for a customized controller - to fill if it needs a single place to summarize the status - of the trait + description: Status is a place holder for a customized controller to fill if it needs a single place to summarize the status of the trait type: string traitRef: description: Reference to a trait created by an ApplicationConfiguration. diff --git a/legacy/crds/core.oam.dev_components.yaml b/legacy/crds/core.oam.dev_components.yaml index 61b22b0e..517cd1ca 100644 --- a/legacy/crds/core.oam.dev_components.yaml +++ b/legacy/crds/core.oam.dev_components.yaml @@ -32,14 +32,10 @@ spec: description: A Component describes how an OAM workload kind may be instantiated. 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' + 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' + 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 @@ -47,34 +43,24 @@ spec: description: A ComponentSpec defines the desired state of a Component. properties: parameters: - description: Parameters exposed by this component. ApplicationConfigurations - that reference this component may specify values for these parameters, - which will in turn be injected into the embedded workload. + description: Parameters exposed by this component. ApplicationConfigurations that reference this component may specify values for these parameters, which will in turn be injected into the embedded workload. items: - description: A ComponentParameter defines a configurable parameter - of a component. + description: A ComponentParameter defines a configurable parameter of a component. properties: description: description: Description of this parameter. type: string fieldPaths: - description: FieldPaths specifies an array of fields within this - Component's workload that will be overwritten by the value of - this parameter. The type of the parameter (e.g. int, string) - is inferred from the type of these fields; All fields must be - of the same type. Fields are specified as JSON field paths without - a leading dot, for example 'spec.replicas'. + description: FieldPaths specifies an array of fields within this Component's workload that will be overwritten by the value of this parameter. The type of the parameter (e.g. int, string) is inferred from the type of these fields; All fields must be of the same type. Fields are specified as JSON field paths without a leading dot, for example 'spec.replicas'. items: type: string type: array name: - description: Name of this parameter. OAM ApplicationConfigurations - will specify parameter values using this name. + description: Name of this parameter. OAM ApplicationConfigurations will specify parameter values using this name. type: string required: - description: Required specifies whether or not a value for this - parameter must be supplied when authoring an ApplicationConfiguration. + description: Required specifies whether or not a value for this parameter must be supplied when authoring an ApplicationConfiguration. type: boolean required: - fieldPaths @@ -82,10 +68,7 @@ spec: type: object type: array workload: - description: A Workload that will be created for each ApplicationConfiguration - that includes this Component. Workload is an instance of a workloadDefinition. - We either use the GVK info or a special "type" field in the workload - to associate the content of the workload with its workloadDefinition + description: A Workload that will be created for each ApplicationConfiguration that includes this Component. Workload is an instance of a workloadDefinition. We either use the GVK info or a special "type" field in the workload to associate the content of the workload with its workloadDefinition type: object @@ -101,25 +84,20 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: A Message containing details about this condition's last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from - one status to another. + description: A Reason for this condition's last transition from one status to another. type: string status: - description: Status of this condition; is it currently True, False, - or Unknown? + description: Status of this condition; is it currently True, False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/legacy/crds/core.oam.dev_containerizedworkloads.yaml b/legacy/crds/core.oam.dev_containerizedworkloads.yaml index 52be5887..14692ee1 100644 --- a/legacy/crds/core.oam.dev_containerizedworkloads.yaml +++ b/legacy/crds/core.oam.dev_containerizedworkloads.yaml @@ -25,20 +25,15 @@ spec: description: A ContainerizedWorkload is a workload that runs OCI containers. 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' + 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' + 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: A ContainerizedWorkloadSpec defines the desired state of a - ContainerizedWorkload. + description: A ContainerizedWorkloadSpec defines the desired state of a ContainerizedWorkload. properties: arch: description: CPUArchitecture required by this workload. @@ -51,12 +46,10 @@ spec: containers: description: Containers of which this workload consists. items: - description: A Container represents an Open Containers Initiative - (OCI) container. + description: A Container represents an Open Containers Initiative (OCI) container. properties: args: - description: Arguments to be passed to the command run by this - container. + description: Arguments to be passed to the command run by this container. items: type: string type: array @@ -68,13 +61,10 @@ spec: config: description: ConfigFiles that should be written within this container. items: - description: A ContainerConfigFile specifies a configuration - file that should be written within a container. + description: A ContainerConfigFile specifies a configuration file that should be written within a container. properties: fromSecret: - description: FromSecret is a secret key reference which - can be used to assign a value to be written to the configuration - file at the given path in the container. + description: FromSecret is a secret key reference which can be used to assign a value to be written to the configuration file at the given path in the container. properties: key: description: The key to select. @@ -87,27 +77,22 @@ spec: - name type: object path: - description: Path within the container at which the configuration - file should be written. + description: Path within the container at which the configuration file should be written. type: string value: - description: Value that should be written to the configuration - file. + description: Value that should be written to the configuration file. type: string required: - path type: object type: array env: - description: Environment variables that should be set within this - container. + description: Environment variables that should be set within this container. items: - description: A ContainerEnvVar specifies an environment variable - that should be set within a container. + description: A ContainerEnvVar specifies an environment variable that should be set within a container. properties: fromSecret: - description: FromSecret is a secret key reference which - can be used to assign a value to the environment variable. + description: FromSecret is a secret key reference which can be used to assign a value to the environment variable. properties: key: description: The key to select. @@ -120,9 +105,7 @@ spec: - name type: object name: - description: Name of the environment variable. Must be composed - of valid Unicode letter and number characters, as well - as _ and -. + description: Name of the environment variable. Must be composed of valid Unicode letter and number characters, as well as _ and -. pattern: ^[-_a-zA-Z0-9]+$ type: string value: @@ -133,22 +116,16 @@ spec: type: object type: array image: - description: Image this container should run. Must be a path-like - or URI-like representation of an OCI image. May be prefixed - with a registry address and should be suffixed with a tag. + description: Image this container should run. Must be a path-like or URI-like representation of an OCI image. May be prefixed with a registry address and should be suffixed with a tag. type: string imagePullSecret: - description: ImagePullSecret specifies the name of a Secret from - which the credentials required to pull this container's image - can be loaded. + description: ImagePullSecret specifies the name of a Secret from which the credentials required to pull this container's image can be loaded. type: string livenessProbe: - description: A LivenessProbe assesses whether this container is - alive. Containers that fail liveness probes will be restarted. + description: A LivenessProbe assesses whether this container is alive. Containers that fail liveness probes will be restarted. properties: exec: - description: Exec probes a container's health by executing - a command. + description: Exec probes a container's health by executing a command. properties: command: description: Command to be run by this probe. @@ -159,24 +136,19 @@ spec: - command type: object failureThreshold: - description: FailureThreshold specifies how many consecutive - probes must fail in order for the container to be considered - healthy. + description: FailureThreshold specifies how many consecutive probes must fail in order for the container to be considered healthy. format: int32 type: integer httpGet: - description: HTTPGet probes a container's health by sending - an HTTP GET request. + description: HTTPGet probes a container's health by sending an HTTP GET request. properties: httpHeaders: description: HTTPHeaders to send with the GET request. items: - description: A HTTPHeader to be passed when probing - a container. + description: A HTTPHeader to be passed when probing a container. properties: name: - description: Name of this HTTP header. Must be unique - per probe. + description: Name of this HTTP header. Must be unique per probe. type: string value: description: Value of this HTTP header. @@ -198,8 +170,7 @@ spec: - port type: object initialDelaySeconds: - description: InitialDelaySeconds after a container starts - before the first probe. + description: InitialDelaySeconds after a container starts before the first probe. format: int32 type: integer periodSeconds: @@ -207,14 +178,11 @@ spec: format: int32 type: integer successThreshold: - description: SuccessThreshold specifies how many consecutive - probes must success in order for the container to be considered - healthy. + description: SuccessThreshold specifies how many consecutive probes must success in order for the container to be considered healthy. format: int32 type: integer tcpSocket: - description: TCPSocketProbe probes a container's health by - connecting to a TCP socket. + description: TCPSocketProbe probes a container's health by connecting to a TCP socket. properties: port: description: Port this probe should connect to. @@ -229,27 +197,23 @@ spec: type: integer type: object name: - description: Name of this container. Must be unique within its - workload. + description: Name of this container. Must be unique within its workload. type: string ports: description: Ports exposed by this container. items: - description: A ContainerPort specifies a port that is exposed - by a container. + description: A ContainerPort specifies a port that is exposed by a container. properties: containerPort: description: Port number. Must be unique within its container. format: int32 type: integer name: - description: Name of this port. Must be unique within its - container. Must be lowercase alphabetical characters. + description: Name of this port. Must be unique within its container. Must be lowercase alphabetical characters. pattern: ^[a-z]+$ type: string protocol: - description: Protocol used by the server listening on this - port. + description: Protocol used by the server listening on this port. enum: - TCP - UDP @@ -260,13 +224,10 @@ spec: type: object type: array readinessProbe: - description: A ReadinessProbe assesses whether this container - is ready to serve requests. Containers that fail readiness probes - will be withdrawn from service. + description: A ReadinessProbe assesses whether this container is ready to serve requests. Containers that fail readiness probes will be withdrawn from service. properties: exec: - description: Exec probes a container's health by executing - a command. + description: Exec probes a container's health by executing a command. properties: command: description: Command to be run by this probe. @@ -277,24 +238,19 @@ spec: - command type: object failureThreshold: - description: FailureThreshold specifies how many consecutive - probes must fail in order for the container to be considered - healthy. + description: FailureThreshold specifies how many consecutive probes must fail in order for the container to be considered healthy. format: int32 type: integer httpGet: - description: HTTPGet probes a container's health by sending - an HTTP GET request. + description: HTTPGet probes a container's health by sending an HTTP GET request. properties: httpHeaders: description: HTTPHeaders to send with the GET request. items: - description: A HTTPHeader to be passed when probing - a container. + description: A HTTPHeader to be passed when probing a container. properties: name: - description: Name of this HTTP header. Must be unique - per probe. + description: Name of this HTTP header. Must be unique per probe. type: string value: description: Value of this HTTP header. @@ -316,8 +272,7 @@ spec: - port type: object initialDelaySeconds: - description: InitialDelaySeconds after a container starts - before the first probe. + description: InitialDelaySeconds after a container starts before the first probe. format: int32 type: integer periodSeconds: @@ -325,14 +280,11 @@ spec: format: int32 type: integer successThreshold: - description: SuccessThreshold specifies how many consecutive - probes must success in order for the container to be considered - healthy. + description: SuccessThreshold specifies how many consecutive probes must success in order for the container to be considered healthy. format: int32 type: integer tcpSocket: - description: TCPSocketProbe probes a container's health by - connecting to a TCP socket. + description: TCPSocketProbe probes a container's health by connecting to a TCP socket. properties: port: description: Port this probe should connect to. @@ -353,8 +305,7 @@ spec: description: CPU required by this container. properties: required: - description: Required CPU count. 1.0 represents one CPU - core. + description: Required CPU count. 1.0 represents one CPU core. type: string required: - required @@ -365,16 +316,13 @@ spec: description: ExtendedResource required by a container. properties: name: - description: Name of the external resource. Resource - names are specified in kind.group/version format, - e.g. motionsensor.ext.example.com/v1. + description: Name of the external resource. Resource names are specified in kind.group/version format, e.g. motionsensor.ext.example.com/v1. type: string required: anyOf: - type: integer - type: string - description: Required extended resource(s), e.g. 8 or - "very-cool-widget" + description: Required extended resource(s), e.g. 8 or "very-cool-widget" x-kubernetes-int-or-string: true required: - name @@ -405,8 +353,7 @@ spec: description: VolumeResource required by a container. properties: accessMode: - description: AccessMode of this volume; RO (read only) - or RW (read and write). + description: AccessMode of this volume; RO (read only) or RW (read and write). enum: - RO - RW @@ -415,8 +362,7 @@ spec: description: Disk requirements of this volume. properties: ephemeral: - description: Ephemeral specifies whether an external - disk needs to be mounted. + description: Ephemeral specifies whether an external disk needs to be mounted. type: boolean required: description: Required disk space. @@ -425,16 +371,13 @@ spec: - required type: object mountPath: - description: MountPath at which this volume will be - mounted within its container. + description: MountPath at which this volume will be mounted within its container. type: string name: - description: Name of this volume. Must be unique within - its container. + description: Name of this volume. Must be unique within its container. type: string sharingPolicy: - description: SharingPolicy of this volume; Exclusive - or Shared. + description: SharingPolicy of this volume; Exclusive or Shared. enum: - Exclusive - Shared @@ -463,8 +406,7 @@ spec: - containers type: object status: - description: A ContainerizedWorkloadStatus represents the observed state - of a ContainerizedWorkload. + description: A ContainerizedWorkloadStatus represents the observed state of a ContainerizedWorkload. properties: conditions: description: Conditions of the resource. @@ -472,25 +414,20 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: A Message containing details about this condition's last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from - one status to another. + description: A Reason for this condition's last transition from one status to another. type: string status: - description: Status of this condition; is it currently True, False, - or Unknown? + description: Status of this condition; is it currently True, False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime @@ -502,9 +439,7 @@ spec: resources: description: Resources managed by this containerised workload. items: - description: A TypedReference refers to an object by Name, Kind, and - APIVersion. It is commonly used to reference cluster-scoped objects - or objects where the namespace is already known. + description: A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known. properties: apiVersion: description: APIVersion of the referenced object. diff --git a/legacy/crds/core.oam.dev_healthscopes.yaml b/legacy/crds/core.oam.dev_healthscopes.yaml index 3d6718cb..513164a6 100644 --- a/legacy/crds/core.oam.dev_healthscopes.yaml +++ b/legacy/crds/core.oam.dev_healthscopes.yaml @@ -26,18 +26,13 @@ spec: status: {} validation: openAPIV3Schema: - description: A HealthScope determines an aggregate health status based of the - health of components. + description: A HealthScope determines an aggregate health status based of the health of components. 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' + 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' + 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 @@ -45,21 +40,17 @@ spec: description: A HealthScopeSpec defines the desired state of a HealthScope. properties: probe-interval: - description: ProbeInterval is the amount of time in seconds between - probing tries. + description: ProbeInterval is the amount of time in seconds between probing tries. format: int32 type: integer probe-timeout: - description: ProbeTimeout is the amount of time in seconds to wait when - receiving a response before marked failure. + description: ProbeTimeout is the amount of time in seconds to wait when receiving a response before marked failure. format: int32 type: integer workloadRefs: description: WorkloadReferences to the workloads that are in this scope. items: - description: A TypedReference refers to an object by Name, Kind, and - APIVersion. It is commonly used to reference cluster-scoped objects - or objects where the namespace is already known. + description: A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known. properties: apiVersion: description: APIVersion of the referenced object. @@ -91,25 +82,20 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: A Message containing details about this condition's last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from - one status to another. + description: A Reason for this condition's last transition from one status to another. type: string status: - description: Status of this condition; is it currently True, False, - or Unknown? + description: Status of this condition; is it currently True, False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime @@ -119,15 +105,12 @@ spec: type: object type: array healthConditions: - description: WorkloadHealthConditions represents health condition of - workloads in the scope + description: WorkloadHealthConditions represents health condition of workloads in the scope items: - description: WorkloadHealthCondition represents informative health - condition. + description: WorkloadHealthCondition represents informative health condition. properties: componentName: - description: ComponentName represents the component name if target - is a workload + description: ComponentName represents the component name if target is a workload type: string diagnosis: type: string @@ -135,9 +118,7 @@ spec: description: HealthStatus represents health status strings. type: string targetWorkload: - description: A TypedReference refers to an object by Name, Kind, - and APIVersion. It is commonly used to reference cluster-scoped - objects or objects where the namespace is already known. + description: A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known. properties: apiVersion: description: APIVersion of the referenced object. @@ -157,16 +138,14 @@ spec: - name type: object workloadStatus: - description: WorkloadStatus represents status of workloads whose - HealthStatus is UNKNOWN. + description: WorkloadStatus represents status of workloads whose HealthStatus is UNKNOWN. type: string required: - healthStatus type: object type: array scopeHealthCondition: - description: ScopeHealthCondition represents health condition summary - of the scope + description: ScopeHealthCondition represents health condition summary of the scope properties: healthStatus: description: HealthStatus represents health status strings. diff --git a/legacy/crds/core.oam.dev_manualscalertraits.yaml b/legacy/crds/core.oam.dev_manualscalertraits.yaml index f930dcc0..f9a2f158 100644 --- a/legacy/crds/core.oam.dev_manualscalertraits.yaml +++ b/legacy/crds/core.oam.dev_manualscalertraits.yaml @@ -22,18 +22,13 @@ spec: status: {} validation: openAPIV3Schema: - description: A ManualScalerTrait determines how many replicas a workload should - have. + description: A ManualScalerTrait determines how many replicas a workload should have. 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' + 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' + 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 @@ -69,8 +64,7 @@ spec: - workloadRef type: object status: - description: A ManualScalerTraitStatus represents the observed state of - a ManualScalerTrait. + description: A ManualScalerTraitStatus represents the observed state of a ManualScalerTrait. properties: conditions: description: Conditions of the resource. @@ -78,25 +72,20 @@ spec: description: A Condition that may apply to a resource. properties: lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. + description: LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: - description: A Message containing details about this condition's - last transition from one status to another, if any. + description: A Message containing details about this condition's last transition from one status to another, if any. type: string reason: - description: A Reason for this condition's last transition from - one status to another. + description: A Reason for this condition's last transition from one status to another. type: string status: - description: Status of this condition; is it currently True, False, - or Unknown? + description: Status of this condition; is it currently True, False, or Unknown? type: string type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. + description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime diff --git a/legacy/crds/core.oam.dev_scopedefinitions.yaml b/legacy/crds/core.oam.dev_scopedefinitions.yaml index 6acf7b03..56742c7f 100644 --- a/legacy/crds/core.oam.dev_scopedefinitions.yaml +++ b/legacy/crds/core.oam.dev_scopedefinitions.yaml @@ -25,20 +25,13 @@ spec: subresources: {} validation: openAPIV3Schema: - description: A ScopeDefinition registers a kind of Kubernetes custom resource - as a valid OAM scope kind by referencing its CustomResourceDefinition. The - CRD is used to validate the schema of the scope when it is embedded in an - OAM ApplicationConfiguration. + description: A ScopeDefinition registers a kind of Kubernetes custom resource as a valid OAM scope kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the scope when it is embedded in an OAM ApplicationConfiguration. 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' + 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' + 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 @@ -46,20 +39,16 @@ spec: description: A ScopeDefinitionSpec defines the desired state of a ScopeDefinition. properties: allowComponentOverlap: - description: AllowComponentOverlap specifies whether an OAM component - may exist in multiple instances of this kind of scope. + description: AllowComponentOverlap specifies whether an OAM component may exist in multiple instances of this kind of scope. type: boolean definitionRef: - description: Reference to the CustomResourceDefinition that defines - this scope kind. + description: Reference to the CustomResourceDefinition that defines this scope kind. properties: name: description: Name of the referenced CustomResourceDefinition. type: string version: - description: Version indicate which version should be used if CRD - has multiple versions by default it will use the first one if - not specified + description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified type: string required: - name @@ -69,8 +58,7 @@ spec: type: object workloadRefsPath: - description: WorkloadRefsPath indicates if/where a scope accepts workloadRef - objects + description: WorkloadRefsPath indicates if/where a scope accepts workloadRef objects type: string required: - allowComponentOverlap diff --git a/legacy/crds/core.oam.dev_traitdefinitions.yaml b/legacy/crds/core.oam.dev_traitdefinitions.yaml index f4b53d10..d5860429 100644 --- a/legacy/crds/core.oam.dev_traitdefinitions.yaml +++ b/legacy/crds/core.oam.dev_traitdefinitions.yaml @@ -25,20 +25,13 @@ spec: subresources: {} validation: openAPIV3Schema: - description: A TraitDefinition registers a kind of Kubernetes custom resource - as a valid OAM trait kind by referencing its CustomResourceDefinition. The - CRD is used to validate the schema of the trait when it is embedded in an - OAM ApplicationConfiguration. + description: A TraitDefinition registers a kind of Kubernetes custom resource as a valid OAM trait kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the trait when it is embedded in an OAM ApplicationConfiguration. 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' + 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' + 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 @@ -46,24 +39,18 @@ spec: description: A TraitDefinitionSpec defines the desired state of a TraitDefinition. properties: appliesToWorkloads: - description: AppliesToWorkloads specifies the list of workload kinds - this trait applies to. Workload kinds are specified in kind.group/version - format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this field - apply to all workload kinds. + description: AppliesToWorkloads specifies the list of workload kinds this trait applies to. Workload kinds are specified in kind.group/version format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to all workload kinds. items: type: string type: array definitionRef: - description: Reference to the CustomResourceDefinition that defines - this trait kind. + description: Reference to the CustomResourceDefinition that defines this trait kind. properties: name: description: Name of the referenced CustomResourceDefinition. type: string version: - description: Version indicate which version should be used if CRD - has multiple versions by default it will use the first one if - not specified + description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified type: string required: - name @@ -73,12 +60,10 @@ spec: type: object revisionEnabled: - description: Revision indicates whether a trait is aware of component - revision + description: Revision indicates whether a trait is aware of component revision type: boolean workloadRefPath: - description: WorkloadRefPath indicates where/if a trait accepts a workloadRef - object + description: WorkloadRefPath indicates where/if a trait accepts a workloadRef object type: string required: - definitionRef diff --git a/legacy/crds/core.oam.dev_workloaddefinitions.yaml b/legacy/crds/core.oam.dev_workloaddefinitions.yaml index e6c76f8d..4a2e46a6 100644 --- a/legacy/crds/core.oam.dev_workloaddefinitions.yaml +++ b/legacy/crds/core.oam.dev_workloaddefinitions.yaml @@ -25,20 +25,13 @@ spec: subresources: {} validation: openAPIV3Schema: - description: A WorkloadDefinition registers a kind of Kubernetes custom resource - as a valid OAM workload kind by referencing its CustomResourceDefinition. - The CRD is used to validate the schema of the workload when it is embedded - in an OAM Component. + description: A WorkloadDefinition registers a kind of Kubernetes custom resource as a valid OAM workload kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the workload when it is embedded in an OAM Component. 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' + 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' + 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 @@ -46,11 +39,9 @@ spec: description: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition. properties: childResourceKinds: - description: ChildResourceKinds are the list of GVK of the child resources - this workload generates + description: ChildResourceKinds are the list of GVK of the child resources this workload generates items: - description: A ChildResourceKind defines a child Kubernetes resource - kind with a selector + description: A ChildResourceKind defines a child Kubernetes resource kind with a selector properties: apiVersion: description: APIVersion of the child resource @@ -61,8 +52,7 @@ spec: selector: additionalProperties: type: string - description: Selector to select the child resources that the workload - wants to expose to traits + description: Selector to select the child resources that the workload wants to expose to traits type: object required: - apiVersion @@ -70,16 +60,13 @@ spec: type: object type: array definitionRef: - description: Reference to the CustomResourceDefinition that defines - this workload kind. + description: Reference to the CustomResourceDefinition that defines this workload kind. properties: name: description: Name of the referenced CustomResourceDefinition. type: string version: - description: Version indicate which version should be used if CRD - has multiple versions by default it will use the first one if - not specified + description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified type: string required: - name @@ -89,14 +76,10 @@ spec: type: object podSpecPath: - description: PodSpecPath indicates where/if this workload has K8s podSpec - field if one workload has podSpec, trait can do lot's of assumption - such as port, env, volume fields. + description: PodSpecPath indicates where/if this workload has K8s podSpec field if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields. type: string revisionLabel: - description: RevisionLabel indicates which label for underlying resources(e.g. - pods) of this workload can be used by trait to create resource selectors(e.g. - label selector for pods). + description: RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload can be used by trait to create resource selectors(e.g. label selector for pods). type: string required: - definitionRef diff --git a/pkg/controller/v1alpha2/applicationconfiguration/applicationconfiguration.go b/pkg/controller/v1alpha2/applicationconfiguration/applicationconfiguration.go index 361e1709..2b83a600 100644 --- a/pkg/controller/v1alpha2/applicationconfiguration/applicationconfiguration.go +++ b/pkg/controller/v1alpha2/applicationconfiguration/applicationconfiguration.go @@ -182,9 +182,11 @@ func NewReconciler(m ctrl.Manager, dm discoverymapper.DiscoveryMapper, o ...Reco trait: ResourceRenderFn(renderTrait), }, workloads: &workloads{ - client: resource.NewAPIPatchingApplicator(m.GetClient()), - rawClient: m.GetClient(), - dm: dm, + // NOTE(roywang) PatchingApplicator@v0.10.0 only use "application/merge-patch+json" type patch + patchingClient: resource.NewAPIPatchingApplicator(m.GetClient()), + updatingClient: resource.NewAPIUpdatingApplicator(m.GetClient()), + rawClient: m.GetClient(), + dm: dm, }, gc: GarbageCollectorFn(eligible), log: logging.NewNopLogger(), diff --git a/pkg/controller/v1alpha2/applicationconfiguration/apply.go b/pkg/controller/v1alpha2/applicationconfiguration/apply.go index d119487f..15bc7fc0 100644 --- a/pkg/controller/v1alpha2/applicationconfiguration/apply.go +++ b/pkg/controller/v1alpha2/applicationconfiguration/apply.go @@ -75,9 +75,12 @@ func (fn WorkloadApplyFns) Finalize(ctx context.Context, ac *v1alpha2.Applicatio } type workloads struct { - client resource.Applicator - rawClient client.Client - dm discoverymapper.DiscoveryMapper + // use patching-apply for creating/updating Workload + patchingClient resource.Applicator + // use updateing-apply for creating/updating Trait + updatingClient resource.Applicator + rawClient client.Client + dm discoverymapper.DiscoveryMapper } func (a *workloads) Apply(ctx context.Context, status []v1alpha2.WorkloadStatus, w []Workload, ao ...resource.ApplyOption) error { @@ -85,7 +88,7 @@ func (a *workloads) Apply(ctx context.Context, status []v1alpha2.WorkloadStatus, var namespace = w[0].Workload.GetNamespace() for _, wl := range w { if !wl.HasDep { - err := a.client.Apply(ctx, wl.Workload, ao...) + err := a.patchingClient.Apply(ctx, wl.Workload, ao...) if err != nil { return errors.Wrapf(err, errFmtApplyWorkload, wl.Workload.GetName()) } @@ -95,7 +98,7 @@ func (a *workloads) Apply(ctx context.Context, status []v1alpha2.WorkloadStatus, continue } t := trait.Object - if err := a.client.Apply(ctx, &trait.Object, ao...); err != nil { + if err := a.updatingClient.Apply(ctx, &trait.Object, ao...); err != nil { return errors.Wrapf(err, errFmtApplyTrait, t.GetAPIVersion(), t.GetKind(), t.GetName()) } } diff --git a/pkg/controller/v1alpha2/applicationconfiguration/apply_test.go b/pkg/controller/v1alpha2/applicationconfiguration/apply_test.go index 90ac3a55..87dfdd4a 100644 --- a/pkg/controller/v1alpha2/applicationconfiguration/apply_test.go +++ b/pkg/controller/v1alpha2/applicationconfiguration/apply_test.go @@ -123,11 +123,12 @@ func TestApplyWorkloads(t *testing.T) { } cases := map[string]struct { - reason string - client resource.Applicator - rawClient client.Client - args args - want error + reason string + client resource.Applicator + updatingClient resource.Applicator + rawClient client.Client + args args + want error }{ "ApplyWorkloadError": { reason: "Errors applying a workload should be reflected as a status condition", @@ -137,7 +138,8 @@ func TestApplyWorkloads(t *testing.T) { } return nil }), - rawClient: nil, + updatingClient: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), + rawClient: nil, args: args{ w: []Workload{{Workload: workload, Traits: []*Trait{{Object: *trait}}}}, ws: []v1alpha2.WorkloadStatus{}}, @@ -145,7 +147,8 @@ func TestApplyWorkloads(t *testing.T) { }, "ApplyTraitError": { reason: "Errors applying a trait should be reflected as a status condition", - client: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { + client: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), + updatingClient: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { if t, ok := o.(*unstructured.Unstructured); ok && t.GetUID() == trait.GetUID() { return errBoom } @@ -159,7 +162,8 @@ func TestApplyWorkloads(t *testing.T) { }, "Success": { reason: "Applied workloads and traits should be returned as a set of UIDs.", - client: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { + client: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), + updatingClient: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { if o.GetObjectKind().GroupVersionKind().Kind == trait.GetKind() { // check that the trait should not have a workload ref since we didn't return a special traitDefinition obj, _ := util.Object2Map(o) @@ -176,8 +180,9 @@ func TestApplyWorkloads(t *testing.T) { }, }, "SuccessWithScope": { - reason: "Applied workloads refs to scopes.", - client: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), + reason: "Applied workloads refs to scopes.", + client: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), + updatingClient: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), rawClient: &test.MockClient{ MockGet: func(_ context.Context, key client.ObjectKey, obj runtime.Object) error { if scopeDef, ok := obj.(*v1alpha2.ScopeDefinition); ok { @@ -217,8 +222,9 @@ func TestApplyWorkloads(t *testing.T) { }, }, "SuccessWithScopeNoOp": { - reason: "Scope already has workloadRef.", - client: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), + reason: "Scope already has workloadRef.", + client: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), + updatingClient: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), rawClient: &test.MockClient{ MockGet: func(_ context.Context, key client.ObjectKey, obj runtime.Object) error { if scopeDef, ok := obj.(*v1alpha2.ScopeDefinition); ok { @@ -258,8 +264,9 @@ func TestApplyWorkloads(t *testing.T) { }, }, "SuccessRemoving": { - reason: "Removes workload refs from scopes.", - client: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), + reason: "Removes workload refs from scopes.", + client: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), + updatingClient: resource.ApplyFn(func(_ context.Context, o runtime.Object, _ ...resource.ApplyOption) error { return nil }), rawClient: &test.MockClient{ MockGet: func(_ context.Context, key client.ObjectKey, obj runtime.Object) error { if key.Name == scope.GetName() { @@ -321,7 +328,7 @@ func TestApplyWorkloads(t *testing.T) { t.Run(name, func(t *testing.T) { mapper := mock.NewMockDiscoveryMapper() - w := workloads{client: tc.client, rawClient: tc.rawClient, dm: mapper} + w := workloads{patchingClient: tc.client, updatingClient: tc.updatingClient, rawClient: tc.rawClient, dm: mapper} err := w.Apply(tc.args.ctx, tc.args.ws, tc.args.w) if diff := cmp.Diff(tc.want, err, test.EquateErrors()); diff != "" { @@ -467,7 +474,7 @@ func TestFinalizeWorkloadScopes(t *testing.T) { t.Run(tc.caseName, func(t *testing.T) { acTest := ac mapper := mock.NewMockDiscoveryMapper() - w := workloads{client: tc.client, rawClient: tc.rawClient, dm: mapper} + w := workloads{patchingClient: tc.client, rawClient: tc.rawClient, dm: mapper} err := w.Finalize(ctx, &acTest) if diff := cmp.Diff(tc.wantErr, err, test.EquateErrors()); diff != "" { diff --git a/pkg/controller/v1alpha2/applicationconfiguration/dependency_test.go b/pkg/controller/v1alpha2/applicationconfiguration/dependency_test.go index ec509327..e5ba1c0c 100644 --- a/pkg/controller/v1alpha2/applicationconfiguration/dependency_test.go +++ b/pkg/controller/v1alpha2/applicationconfiguration/dependency_test.go @@ -435,6 +435,20 @@ var _ = Describe("Resource Dependency in an ApplicationConfiguration", func() { logf.Log.Info("Checking on resource that inputs data", "Key", inFooKey) Expect(k8sClient.Get(ctx, inFooKey, inFoo)).Should(BeNil()) + Eventually(func() error { + err := k8sClient.Get(ctx, outFooKey, outFoo) + if err != nil { + // Try 3 (= 1s/300ms) times + reconciler.Reconcile(req) + } + return err + }, time.Second, 300*time.Millisecond).Should(BeNil()) + err = unstructured.SetNestedField(outFoo.Object, "test", "status", "key") + Expect(err).Should(BeNil()) + err = unstructured.SetNestedField(outFoo.Object, "hash-v1", "status", "app-hash") + Expect(err).Should(BeNil()) + Expect(k8sClient.Update(ctx, outFoo)).Should(Succeed()) + By("Update AppConfig with new version") newAppConfig.Labels["app-hash"] = "hash-v2" Expect(k8sClient.Update(ctx, newAppConfig)).Should(BeNil()) diff --git a/pkg/controller/v1alpha2/applicationconfiguration/update_trait_test.go b/pkg/controller/v1alpha2/applicationconfiguration/update_trait_test.go new file mode 100644 index 00000000..c669e0e4 --- /dev/null +++ b/pkg/controller/v1alpha2/applicationconfiguration/update_trait_test.go @@ -0,0 +1,269 @@ +package applicationconfiguration + +import ( + "context" + "time" + + "github.com/ghodss/yaml" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + corev1 "k8s.io/api/core/v1" + crdv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + + "github.com/crossplane/oam-kubernetes-runtime/apis/core/v1alpha2" + "github.com/crossplane/oam-kubernetes-runtime/pkg/oam/util" + + "sigs.k8s.io/controller-runtime/pkg/client" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/reconcile" +) + +var _ = Describe("Test Updating-apply trait in an ApplicationConfiguration", func() { + const ( + namespace = "update-apply-trait-test" + appName = "example-app" + compName = "example-comp" + fakeTraitCRDName = "bars.example.com" + fakeTraitGroup = "example.com" + fakeTraiitKind = "Bar" + ) + var ( + ctx = context.Background() + cw v1alpha2.ContainerizedWorkload + component v1alpha2.Component + traitDef v1alpha2.TraitDefinition + appConfig v1alpha2.ApplicationConfiguration + appConfigKey = client.ObjectKey{ + Name: appName, + Namespace: namespace, + } + req = reconcile.Request{NamespacedName: appConfigKey} + ns = corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: namespace, + }, + } + ) + + BeforeEach(func() { + cw = v1alpha2.ContainerizedWorkload{ + TypeMeta: metav1.TypeMeta{ + Kind: "ContainerizedWorkload", + APIVersion: "core.oam.dev/v1alpha2", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + }, + Spec: v1alpha2.ContainerizedWorkloadSpec{ + Containers: []v1alpha2.Container{ + { + Name: "wordpress", + Image: "wordpress:4.6.1-apache", + Ports: []v1alpha2.ContainerPort{ + { + Name: "wordpress", + Port: 80, + }, + }, + }, + }, + }, + } + component = v1alpha2.Component{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "core.oam.dev/v1alpha2", + Kind: "Component", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: compName, + Namespace: namespace, + }, + Spec: v1alpha2.ComponentSpec{ + Workload: runtime.RawExtension{ + Object: &cw, + }, + }, + } + appConfig = v1alpha2.ApplicationConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: appName, + Namespace: namespace, + }, + } + + logf.Log.Info("Start to run a test, clean up previous resources") + // delete the namespace with all its resources + Expect(k8sClient.Delete(ctx, &ns, client.PropagationPolicy(metav1.DeletePropagationForeground))). + Should(SatisfyAny(BeNil(), &util.NotFoundMatcher{})) + logf.Log.Info("make sure all the resources are removed") + Eventually( + // gomega has a bug that can't take nil as the actual input, so has to make it a func + func() error { + return k8sClient.Get(ctx, client.ObjectKey{Name: namespace}, &corev1.Namespace{}) + }, + time.Second*120, time.Millisecond*500).Should(&util.NotFoundMatcher{}) + + By("Create namespace") + Eventually( + func() error { + return k8sClient.Create(ctx, &ns) + }, + time.Second*3, time.Millisecond*300).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) + + By("Create a CRD used as fake trait") + crd = crdv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: fakeTraitCRDName, + Labels: map[string]string{"crd": namespace}, + }, + Spec: crdv1.CustomResourceDefinitionSpec{ + Group: fakeTraitGroup, + Names: crdv1.CustomResourceDefinitionNames{ + Kind: fakeTraiitKind, + ListKind: "BarList", + Plural: "bars", + Singular: "bar", + }, + Versions: []crdv1.CustomResourceDefinitionVersion{{ + Name: "v1", + Served: true, + Storage: true, + Schema: &crdv1.CustomResourceValidation{ + OpenAPIV3Schema: &crdv1.JSONSchemaProps{ + Type: "object", + Properties: map[string]crdv1.JSONSchemaProps{ + "spec": { + Type: "object", + Properties: map[string]crdv1.JSONSchemaProps{ + "unchanged": {Type: "string"}, + "removed": {Type: "string"}, + "valueChanged": {Type: "string"}, + "added": {Type: "string"}, + }}}}}}, + }, + Scope: crdv1.NamespaceScoped, + }, + } + Expect(k8sClient.Create(context.Background(), &crd)).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) + + By("Create Component") + Expect(k8sClient.Create(ctx, &component)).Should(Succeed()) + cmpV1 := &v1alpha2.Component{} + Expect(k8sClient.Get(ctx, client.ObjectKey{Namespace: namespace, Name: compName}, cmpV1)).Should(Succeed()) + + By("Creat TraitDefinition") + traitDef = v1alpha2.TraitDefinition{ + TypeMeta: metav1.TypeMeta{ + Kind: "core.oam.dev/v1alpha2", + APIVersion: "TraitDefinition", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "bars.example.com", + }, + Spec: v1alpha2.TraitDefinitionSpec{ + Reference: v1alpha2.DefinitionReference{ + Name: fakeTraitCRDName, + }, + }, + } + Expect(k8sClient.Create(ctx, &traitDef)).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) + + By("Create an ApplicationConfiguration") + appConfigYAML := ` +apiVersion: core.oam.dev/v1alpha2 +kind: ApplicationConfiguration +metadata: + name: example-app +spec: + components: + - componentName: example-comp + traits: + - trait: + apiVersion: example.com/v1 + kind: Bar + metadata: + labels: + test.label: test + spec: + unchanged: bar + removed: bar + valueChanged: bar` + Expect(yaml.Unmarshal([]byte(appConfigYAML), &appConfig)).Should(BeNil()) + Expect(k8sClient.Create(ctx, &appConfig)).Should(Succeed()) + + By("Reconcile") + Expect(func() error { _, err := reconciler.Reconcile(req); return err }()).Should(BeNil()) + }) + + AfterEach(func() { + logf.Log.Info("delete all cluster-scoped resources") + By("Delete CRD used as fake trait") + Expect(k8sClient.Delete(context.Background(), &crd)).Should(BeNil()) + By("Delete fake TraitDefinition ") + Expect(k8sClient.Delete(context.Background(), &traitDef)).Should(BeNil()) + }) + + When("update an ApplicationConfiguration with Traits changed", func() { + It("should updating-apply the changed trait", func() { + By("Update the ApplicationConfiguration") + appConfigYAMLUpdated := ` +apiVersion: core.oam.dev/v1alpha2 +kind: ApplicationConfiguration +metadata: + name: example-app +spec: + components: + - componentName: example-comp + traits: + - trait: + apiVersion: example.com/v1 + kind: Bar + spec: + unchanged: bar + valueChanged: foo + added: bar` + + Expect(k8sClient.Get(ctx, appConfigKey, &appConfig)).Should(Succeed()) + appConfigUpdated := v1alpha2.ApplicationConfiguration{} + Expect(yaml.Unmarshal([]byte(appConfigYAMLUpdated), &appConfigUpdated)).Should(BeNil()) + appConfigUpdated.SetResourceVersion(appConfig.GetResourceVersion()) + appConfigUpdated.SetNamespace(namespace) + Expect(k8sClient.Update(ctx, &appConfigUpdated)).Should(Succeed()) + + By("Reconcile") + Expect(func() error { _, err := reconciler.Reconcile(req); return err }()).Should(BeNil()) + + By("Get updated AppConfig") + Expect(k8sClient.Get(ctx, appConfigKey, &appConfig)).Should(Succeed()) + + By("Get updated trait object") + var traitObj unstructured.Unstructured + traitObj.SetAPIVersion("example.com/v1") + traitObj.SetKind("Bar") + tName := appConfig.Status.Workloads[0].Traits[0].Reference.Name + Expect(k8sClient.Get(ctx, client.ObjectKey{Namespace: namespace, Name: tName}, &traitObj)).Should(Succeed()) + + By("Check labels are removed") + _, found, _ := unstructured.NestedString(traitObj.UnstructuredContent(), "metadata", "labels", "test.label") + Expect(found).Should(Equal(false)) + By("Check unchanged field") + v, _, _ := unstructured.NestedString(traitObj.UnstructuredContent(), "spec", "unchanged") + Expect(v).Should(Equal("bar")) + By("Check changed field") + v, _, _ = unstructured.NestedString(traitObj.UnstructuredContent(), "spec", "valueChanged") + Expect(v).Should(Equal("foo")) + By("Check added field") + v, _, _ = unstructured.NestedString(traitObj.UnstructuredContent(), "spec", "added") + Expect(v).Should(Equal("bar")) + // if use patching trait, this field will not be removed + By("Check removed field") + _, found, _ = unstructured.NestedString(traitObj.UnstructuredContent(), "spec", "removed") + Expect(found).Should(Equal(false)) + }) + }) + +}) diff --git a/pkg/oam/util/helper_test.go b/pkg/oam/util/helper_test.go index eeac65fb..7b29b92c 100644 --- a/pkg/oam/util/helper_test.go +++ b/pkg/oam/util/helper_test.go @@ -911,7 +911,7 @@ func TestPatchCondition(t *testing.T) { r: &test.MockClient{ MockStatusPatch: test.NewMockStatusPatchFn(nil), }, - workload: &fake.Claim{}, + workload: &fake.Target{}, condition: []v1alpha1.Condition{ {}, }, @@ -925,7 +925,7 @@ func TestPatchCondition(t *testing.T) { r: &test.MockClient{ MockStatusPatch: test.NewMockStatusPatchFn(patchErr), }, - workload: &fake.Claim{}, + workload: &fake.Target{}, condition: []v1alpha1.Condition{ {}, },