Kubernetes Apache Openwhisk Operator API Reference

Collection of Kubernetes operators for managing Apache Openwhisk resources, such as actions, packages, triggers and rules.

Version: 1.0

Paths

Schema Definitions

ibmcloud.v1alpha1.ConfigMapKeyReference:

ConfigMapKeyReference selects a ConfigMap and optionally a key from it.

name: string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

Example
name: string

ibmcloud.v1alpha1.Function:

Function is the Schema for the functions API

apiVersion: string

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/api-conventions.md#resources

kind: string

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/api-conventions.md#types-kinds

metadata: meta.v1.ObjectMeta
spec: ibmcloud.v1alpha1.FunctionSpec
status: ibmcloud.v1alpha1.FunctionStatus
Example
apiVersion: ibmcloud.ibm.com/v1alpha1
kind: Function
metadata:
  name: myfunction
  namespace: default
spec:
  codeURI: >-
    https://raw.githubusercontent.com/apache/incubator-openwhisk-catalog/master/packages/utils/echo.js
  parameters:
    - name: message
      value: Hello World
  runtime: 'nodejs:6'

ibmcloud.v1alpha1.FunctionList:

FunctionList contains a list of Function

apiVersion: string

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/api-conventions.md#resources

items: ibmcloud.v1alpha1.Function
ibmcloud.v1alpha1.Function
kind: string

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/api-conventions.md#types-kinds

metadata: meta.v1.ListMeta
Example
apiVersion: string
items:
  - apiVersion: ibmcloud.ibm.com/v1alpha1
    kind: Function
    metadata:
      name: myfunction
      namespace: default
    spec:
      codeURI: >-
        https://raw.githubusercontent.com/apache/incubator-openwhisk-catalog/master/packages/utils/echo.js
      parameters:
        - name: message
          value: Hello World
      runtime: 'nodejs:6'
kind: string

ibmcloud.v1alpha1.FunctionSpec:

FunctionSpec represents the specification for Function resources

annotations: lib.keyvalue.v1.KeyValue

List of key/value annotations

lib.keyvalue.v1.KeyValue
code: string

The inline code to deploy.

codeURI: string

The location of the code to deploy. Support http(s) and file protocols.

contextFrom: io.k8s.api.core.v1.SecretEnvSource

Reference to a secret representing where to deploy this entity Default is seed-default-owprops The secret must defines these fields: apihost (string) : The OpenWhisk host auth (string): the authorization key cert (string): the client certificate (optional) insecure (bool): Whether or not to bypass certificate checking (optional, default is false)

docker: string

Docker image identifier (in dockerhub). More info: https://github.com/apache/incubator-openwhisk/blob/master/docs/actions-docker.md

functions: string

Comma separated sequence of actions. Only valid when runtime is sequence

limits: ibmcloud.v1alpha1.Limits

Sets the action limits. More info: https://github.com/apache/incubator-openwhisk/blob/master/docs/reference.md#system-limits

main: string

The name of the action entry point (function or fully-qualified method name when applicable)

name: string

Action name. Override metadata.name. Does not include the package name (see below)

native: boolean

Run the action as native. More info: https://github.com/apache/incubator-openwhisk/blob/master/docs/actions-docker.md#creating-native-actions

package: string

Action package name. Add it to the default package when not specified

parameters: lib.keyvalue.v1.KeyValue

List of key/value input parameters

lib.keyvalue.v1.KeyValue
rawHTTP: boolean

Indicates if the function is able to consume the raw contents within the body of an HTTP request. Only valid when webExport is true. More info: https://github.com/apache/incubator-openwhisk/blob/master/docs/webactions.md#raw-http-handling

runtime: string

Runtime name and optional version. More info: https://github.com/apache/incubator-openwhisk/blob/master/docs/actions.md#languages-and-runtimes

Support these runtimes (not an exhaustive live):

Runtime image name Description
app N/A runs a function composition
sequence N/A runs a function sequence
nodejs nodejsaction:latest Latest NodeJS runtime
nodejs:6 nodejs6action:latest Latest NodeJS 6 runtime
java java8action:latest Latest Java language runtime
python:2 python2action:latest Latest Python 2 language runtime
python:3 python3action:latest Latest Python 3 language runtime
swift swiftaction:latest Latest Swift 2 language runtime
swift:3 swift3action:latest Latest Swift 3 language runtime
swift:3.1.1 action-swift-v3.1.1:latest Latest Swift 3.1.1 language runtime
php:7.1 action-php-v7.1:latest Latest PHP language runtime
webExport: boolean

Turns the function into a "web action" causing it to return HTTP content without use of an API Gateway. More info: https://github.com/apache/incubator-openwhisk/blob/master/docs/webactions.md

Example
annotations:
  - attributes: object
    name: string
    valueFrom: {}
code: string
codeURI: string
docker: string
functions: string
limits:
  logSize: integer (int32)
  memory: integer (int32)
  timeout: integer (int32)
main: string
name: string
native: boolean
package: string
parameters:
  - attributes: object
    name: string
    valueFrom: {}
rawHTTP: boolean
runtime: string
webExport: boolean

ibmcloud.v1alpha1.FunctionStatus:

FunctionStatus defines the observed state of Function

generation: integer (int64)

Last synced generation. Set by the system

message: string
state: string
Example
generation: integer (int64)
message: string
state: string

ibmcloud.v1alpha1.Invocation:

Invocation is the Schema for the invocations API

apiVersion: string

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/api-conventions.md#resources

kind: string

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/api-conventions.md#types-kinds

metadata: meta.v1.ObjectMeta
spec: ibmcloud.v1alpha1.InvocationSpec
status: ibmcloud.v1alpha1.InvocationStatus
Example
apiVersion: ibmcloud.ibm.com/v1alpha1
kind: Invocation
metadata:
  name: echo-invocation
spec:
  finalizer:
    function: /whisk.system/utils/echo
    parameters:
      - name: message
        value: Bye World
  function: /whisk.system/utils/echo
  parameters:
    - name: message
      value: Hello World

ibmcloud.v1alpha1.InvocationFinalizer:

InvocationFinalizer defines the function to invoke when deleting the function invocation

function: string

Function defines the name of the function to invoke (eg. /whisk.system/utils/echo or myfunction) Invokes the function in the invocation context when the name is not fully qualified

parameters: lib.keyvalue.v1.KeyValue

Parameters defines the list of parameters to use for the invocation

lib.keyvalue.v1.KeyValue
Example
function: string
parameters:
  - attributes: object
    name: string
    valueFrom: {}

ibmcloud.v1alpha1.InvocationList:

InvocationList contains a list of Invocation

apiVersion: string

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/api-conventions.md#resources

items: ibmcloud.v1alpha1.Invocation
ibmcloud.v1alpha1.Invocation
kind: string

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/api-conventions.md#types-kinds

metadata: meta.v1.ListMeta
Example
apiVersion: string
items:
  - apiVersion: ibmcloud.ibm.com/v1alpha1
    kind: Invocation
    metadata:
      name: echo-invocation
    spec:
      finalizer:
        function: /whisk.system/utils/echo
        parameters:
          - name: message
            value: Bye World
      function: /whisk.system/utils/echo
      parameters:
        - name: message
          value: Hello World
kind: string

ibmcloud.v1alpha1.InvocationSpec:

InvocationSpec defines the desired state of Invocation

contextFrom: io.k8s.api.core.v1.SecretEnvSource

Reference to a secret representing where to deploy this entity Default is seed-default-owprops The secret must defines these fields: apihost (string) : The OpenWhisk host auth (string): the authorization key cert (string): the client certificate (optional) insecure (bool): Whether or not to bypass certificate checking (optional, default is false)

finalizer: ibmcloud.v1alpha1.InvocationFinalizer

Defines the function to invoke when this resource is deleted.

function: string

defines the name of function to invoke (eg. /whisk.system/utils/echo or myfunction) Invokes the function in the invocation context when the name is not fully qualified

parameters: lib.keyvalue.v1.KeyValue

Defines the list of parameters to use for the invocation

lib.keyvalue.v1.KeyValue
to: ibmcloud.v1alpha1.InvocationTarget

Defines where to store the invocation result. Discard the result when not specified.

Example

finalizer:
  function: string
  parameters:
    - attributes: object
      name: string
      valueFrom: {}
function: string
parameters:
  - attributes: object
    name: string
    valueFrom: {}
to:
  projection: '{@.response.result.message}'
  secretKeyRef:
    key: secret-key
    name: secret-name

ibmcloud.v1alpha1.InvocationStatus:

InvocationStatus defines the observed state of Invocation

generation: integer (int64)

Last synced generation. Set by the system

message: string
state: string
Example
generation: integer (int64)
message: string
state: string

ibmcloud.v1alpha1.InvocationTarget:

InvocationTarget represents where to store the invocation result

configMapKeyRef: io.k8s.api.core.v1.ConfigMapKeySelector

Selects a key of a ConfigMap.

projection: string

JSONPath template selecting parts of the invocation result to store. Default is "{@.response.result}" More info: https://kubernetes.io/docs/reference/kubectl/jsonpath/

secretKeyRef: io.k8s.api.core.v1.SecretKeySelector

Selects a key of a secret in the invocation namespace

Example
projection: '{@.response.result.message}'
secretKeyRef:
  key: secret-key
  name: secret-name

ibmcloud.v1alpha1.Limits:

Limits is used to express function resources constraints such as memory limits or timeout

logSize: integer (int32)

The action log size. Default unit is assumed to be in megabytes (MB).

memory: integer (int32)

The per-Action memory. Default unit is assumed to be in megabytes (MB).

timeout: integer (int32)

The per-invocation Action timeout. Default unit is assumed to be milliseconds (ms).

Example
logSize: integer (int32)
memory: integer (int32)
timeout: integer (int32)

ibmcloud.v1alpha1.Package:

Package is the Schema for the packages API

apiVersion: string

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/api-conventions.md#resources

kind: string

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/api-conventions.md#types-kinds

metadata: meta.v1.ObjectMeta
spec: ibmcloud.v1alpha1.PackageSpec
status: ibmcloud.v1alpha1.PackageStatus
Example
apiVersion: ibmcloud.ibm.com/v1alpha1
kind: Package
metadata:
  name: mh-publish
spec:
  bind: /whisk.system/messaging
  service: message-hub

ibmcloud.v1alpha1.PackageList:

PackageList contains a list of Package

apiVersion: string

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/api-conventions.md#resources

items: ibmcloud.v1alpha1.Package
ibmcloud.v1alpha1.Package
kind: string

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/api-conventions.md#types-kinds

metadata: meta.v1.ListMeta
Example
apiVersion: string
items:
  - apiVersion: ibmcloud.ibm.com/v1alpha1
    kind: Package
    metadata:
      name: mh-publish
    spec:
      bind: /whisk.system/messaging
      service: message-hub
kind: string

ibmcloud.v1alpha1.PackageSpec:

PackageSpec defines the desired state of Package

annotations: lib.keyvalue.v1.KeyValue

List of key/value annotations

lib.keyvalue.v1.KeyValue
bind: string

Name of the package for which a binding should be created

contextFrom: io.k8s.api.core.v1.SecretEnvSource

Reference to a secret representing where to deploy this entity Default is seed-default-owprops The secret must defines these fields: apihost (string) : The OpenWhisk host auth (string): the authorization key cert (string): the client certificate (optional) insecure (bool): Whether or not to bypass certificate checking (optional, default is false)

name: string

Package name. Override metadata.name. default is reserved.

parameters: lib.keyvalue.v1.KeyValue

List of key/value input parameters

lib.keyvalue.v1.KeyValue
parametersFrom: ibmcloud.v1alpha1.ParametersFromSource

List of key/value input parameters coming from a Secret or ConfigMap When multiple sources are specified, all key/value pairs are merged into a single set of key/value pairs, from the first source to the last source Duplicates are handled by overriding the previous key/value pair. The parameters property is applied last

ibmcloud.v1alpha1.ParametersFromSource
publish: boolean

Package visibility; true for shared, false for private

service: string

indicates a cloud service resource which you want to bind to. This feature provides automatic injection of service keys into the binding parameters (for example user, password, urls)

Example
annotations:
  - attributes: object
    name: string
    valueFrom: {}
bind: string
name: string
parameters:
  - attributes: object
    name: string
    valueFrom: {}
parametersFrom:
  - configMapKeyRef:
      name: string
    secretKeyRef:
      name: string
publish: boolean
service: string

ibmcloud.v1alpha1.PackageStatus:

PackageStatus defines the observed state of Package

generation: integer (int64)

Last synced generation. Set by the system

message: string
state: string
Example
generation: integer (int64)
message: string
state: string

ibmcloud.v1alpha1.ParametersFromSource:

ParametersFromSource represents a source for the value of parameters

configMapKeyRef: ibmcloud.v1alpha1.ConfigMapKeyReference

Selects a key of a ConfigMap.

secretKeyRef: ibmcloud.v1alpha1.SecretKeyReference

Selects a key of a secret in the resource namespace

Example
configMapKeyRef:
  name: string
secretKeyRef:
  name: string

ibmcloud.v1alpha1.Rule:

Rule is the Schema for the rules API

apiVersion: string

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/api-conventions.md#resources

kind: string

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/api-conventions.md#types-kinds

metadata: meta.v1.ObjectMeta
spec: ibmcloud.v1alpha1.RuleSpec
status: ibmcloud.v1alpha1.RuleStatus
Example
apiVersion: ibmcloud.ibm.com/v1alpha1
kind: Rule
metadata:
  name: my-rule
spec:
  action: hello-world
  trigger: image-uploaded

ibmcloud.v1alpha1.RuleList:

RuleList contains a list of Rule

apiVersion: string

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/api-conventions.md#resources

items: ibmcloud.v1alpha1.Rule
ibmcloud.v1alpha1.Rule
kind: string

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/api-conventions.md#types-kinds

metadata: meta.v1.ListMeta
Example
apiVersion: string
items:
  - apiVersion: ibmcloud.ibm.com/v1alpha1
    kind: Rule
    metadata:
      name: my-rule
    spec:
      action: hello-world
      trigger: image-uploaded
kind: string

ibmcloud.v1alpha1.RuleSpec:

RuleSpec defines the desired state of Rule

contextFrom: io.k8s.api.core.v1.SecretEnvSource

Reference to a secret representing where to deploy this entity Default is seed-default-owprops The secret must defines these fields: apihost (string) : The OpenWhisk host auth (string): the authorization key cert (string): the client certificate (optional) insecure (bool): Whether or not to bypass certificate checking (optional, default is false)

function: string

Name of the action the rule applies to

name: string

Rule name. Override metadata.name.

trigger: string

Name of the trigger the Rule applies to

Example

function: string
name: string
trigger: string

ibmcloud.v1alpha1.RuleStatus:

RuleStatus defines the observed state of Rule

generation: integer (int64)

Last synced generation. Set by the system

message: string
state: string
Example
generation: integer (int64)
message: string
state: string

ibmcloud.v1alpha1.SecretKeyReference:

SecretKeyReference selects a secret and optionally a key from it.

name: string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

Example
name: string

ibmcloud.v1alpha1.Trigger:

Trigger is the Schema for the triggers API

apiVersion: string

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/api-conventions.md#resources

kind: string

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/api-conventions.md#types-kinds

metadata: meta.v1.ObjectMeta
spec: ibmcloud.v1alpha1.TriggerSpec
status: ibmcloud.v1alpha1.TriggerStatus
Example
apiVersion: ibmcloud.ibm.com/v1alpha1
kind: Trigger
metadata:
  name: image-uploaded
spec:
  feed: openwhisk-cloudant/changes

ibmcloud.v1alpha1.TriggerList:

TriggerList contains a list of Trigger

apiVersion: string

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/api-conventions.md#resources

items: ibmcloud.v1alpha1.Trigger
ibmcloud.v1alpha1.Trigger
kind: string

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/api-conventions.md#types-kinds

metadata: meta.v1.ListMeta
Example
apiVersion: string
items:
  - apiVersion: ibmcloud.ibm.com/v1alpha1
    kind: Trigger
    metadata:
      name: image-uploaded
    spec:
      feed: openwhisk-cloudant/changes
kind: string

ibmcloud.v1alpha1.TriggerSpec:

TriggerSpec defines the desired state of Trigger

annotations: lib.keyvalue.v1.KeyValue

List of key/value annotations

lib.keyvalue.v1.KeyValue
contextFrom: io.k8s.api.core.v1.SecretEnvSource

Reference to a secret representing where to deploy this entity Default is seed-default-owprops The secret must defines these fields: apihost (string) : The OpenWhisk host auth (string): the authorization key cert (string): the client certificate (optional) insecure (bool): Whether or not to bypass certificate checking (optional, default is false)

feed: string

Name of the feed associated with the trigger

name: string

Trigger name. Override metadata.name.

parameters: lib.keyvalue.v1.KeyValue

List of key/value input parameters

lib.keyvalue.v1.KeyValue
Example
annotations:
  - attributes: object
    name: string
    valueFrom: {}
feed: string
name: string
parameters:
  - attributes: object
    name: string
    valueFrom: {}

ibmcloud.v1alpha1.TriggerStatus:

TriggerStatus defines the observed state of Trigger

generation: integer (int64)

Last synced generation. Set by the system

message: string
state: string
Example
generation: integer (int64)
message: string
state: string

lib.keyvalue.v1.KeyValue:

KeyValue represents a key-value pair

attributes: object

A parameter may have attributes (e.g. message hub topic might have partitions)

name: string

Name representing the key.

value: runtime.RawExtension

Defaults to null.

valueFrom: lib.keyvalue.v1.KeyValueSource

Source for the value. Cannot be used if value is not empty.

Example
attributes: object
name: string
valueFrom: {}

lib.keyvalue.v1.KeyValueSource:

KeyValueSource represents a source for the value of a KeyValue.

configMapKeyRef: io.k8s.api.core.v1.ConfigMapKeySelector

Selects a key of a ConfigMap.

secretKeyRef: io.k8s.api.core.v1.SecretKeySelector

Selects a key of a secret in the resource namespace

Example
{}