---
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    funktion.fabric8.io/kind: Connector
  name: kubernetes
data:
  deployment.yml: |
    ---
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      labels:
        funktion.fabric8.io/kind: Subscription
        connector: kubernetes
    spec:
      replicas: 1
      template:
        metadata:
          labels:
            funktion.fabric8.io/kind: Subscription
            connector: kubernetes
        spec:
          containers:
          - image: funktion/connector-kubernetes:${project.version}
            name: connector
  schema.yml: |
    ---
    component:
      kind: component
      scheme: kubernetes
      syntax: kubernetes:masterUrl
      title: Kubernetes
      description: The kubernetes component allows to work with Kubernetes PaaS.
      label: container,cloud,paas
      deprecated: false
      async: false
      javaType: org.apache.camel.component.kubernetes.KubernetesComponent
      groupId: org.apache.camel
      artifactId: camel-kubernetes
      version: 2.18.3
    componentProperties: {}
    properties:
      masterUrl:
        kind: path
        group: common
        required: true
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: Kubernetes Master url
        order: 0
      apiVersion:
        kind: parameter
        group: common
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The Kubernetes API Version to use
        order: 1
      category:
        kind: parameter
        group: common
        required: true
        type: string
        javaType: java.lang.String
        enum:
        - namespaces
        - services
        - replicationControllers
        - pods
        - persistentVolumes
        - persistentVolumesClaims
        - secrets
        - resourcesQuota
        - serviceAccounts
        - nodes
        - configMaps
        - builds
        - buildConfigs
        deprecated: false
        secret: false
        description: Kubernetes Producer and Consumer category
        order: 2
      dnsDomain:
        kind: parameter
        group: common
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The dns domain used for ServiceCall EIP
        order: 3
      kubernetesClient:
        kind: parameter
        group: common
        type: object
        javaType: io.fabric8.kubernetes.client.DefaultKubernetesClient
        deprecated: false
        secret: false
        description: Default KubernetesClient to use if provided
        order: 4
      portName:
        kind: parameter
        group: common
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The port name used for ServiceCall EIP
        order: 5
      bridgeErrorHandler:
        kind: parameter
        group: consumer
        label: consumer
        type: boolean
        javaType: boolean
        optionalPrefix: consumer.
        deprecated: false
        secret: false
        defaultValue: false
        description: Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
        order: 6
      labelKey:
        kind: parameter
        group: consumer
        label: consumer
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The Consumer Label key when watching at some resources
        order: 7
      labelValue:
        kind: parameter
        group: consumer
        label: consumer
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The Consumer Label value when watching at some resources
        order: 8
      namespace:
        kind: parameter
        group: consumer
        label: consumer
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The namespace
        order: 9
      poolSize:
        kind: parameter
        group: consumer
        label: consumer
        type: integer
        javaType: int
        deprecated: false
        secret: false
        defaultValue: "1"
        description: The Consumer pool size
        order: 10
      resourceName:
        kind: parameter
        group: consumer
        label: consumer
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The Consumer Resource Name we would like to watch
        order: 11
      exceptionHandler:
        kind: parameter
        group: consumer (advanced)
        label: consumer,advanced
        type: object
        javaType: org.apache.camel.spi.ExceptionHandler
        optionalPrefix: consumer.
        deprecated: false
        secret: false
        description: To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
        order: 12
      exchangePattern:
        kind: parameter
        group: consumer (advanced)
        label: consumer,advanced
        type: string
        javaType: org.apache.camel.ExchangePattern
        enum:
        - InOnly
        - RobustInOnly
        - InOut
        - InOptionalOut
        - OutOnly
        - RobustOutOnly
        - OutIn
        - OutOptionalIn
        deprecated: false
        secret: false
        description: Sets the exchange pattern when the consumer creates an exchange.
        order: 13
      operation:
        kind: parameter
        group: producer
        label: producer
        type: string
        javaType: java.lang.String
        enum:
        - listNamespaces
        - listNamespacesByLabels
        - getNamespace
        - createNamespace
        - deleteNamespace
        - listServices
        - listServicesByLabels
        - getService
        - createService
        - deleteService
        - listReplicationControllers
        - listReplicationControllersByLabels
        - getReplicationController
        - createReplicationController
        - deleteReplicationController
        - scaleReplicationController
        - listPods
        - listPodsByLabels
        - getPod
        - createPod
        - deletePod
        - listPersistentVolumes
        - listPersistentVolumesByLabels
        - getPersistentVolume
        - listPersistentVolumesClaims
        - listPersistentVolumesClaimsByLabels
        - getPersistentVolumeClaim
        - createPersistentVolumeClaim
        - deletePersistentVolumeClaim
        - listSecrets
        - listSecretsByLabels
        - getSecret
        - createSecret
        - deleteSecret
        - listResourcesQuota
        - listResourcesQuotaByLabels
        - getResourceQuota
        - createResourceQuota
        - deleteResourceQuota
        - listServiceAccounts
        - listServiceAccountsByLabels
        - getServiceAccount
        - createServiceAccount
        - deleteServiceAccount
        - listNodes
        - listNodesByLabels
        - getNode
        - listConfigMaps
        - listConfigMapsByLabels
        - getConfigMap
        - createConfigMap
        - deleteConfigMap
        - listBuilds
        - listBuildsByLabels
        - getBuild
        - listBuildConfigs
        - listBuildConfigsByLabels
        - getBuildConfig
        deprecated: false
        secret: false
        description: Producer operation to do on Kubernetes
        order: 14
      synchronous:
        kind: parameter
        group: advanced
        label: advanced
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: false
        description: Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
        order: 15
      caCertData:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The CA Cert Data
        order: 16
      caCertFile:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The CA Cert File
        order: 17
      clientCertData:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The Client Cert Data
        order: 18
      clientCertFile:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The Client Cert File
        order: 19
      clientKeyAlgo:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The Key Algorithm used by the client
        order: 20
      clientKeyData:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The Client Key data
        order: 21
      clientKeyFile:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The Client Key file
        order: 22
      clientKeyPassphrase:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The Client Key Passphrase
        order: 23
      oauthToken:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: The Auth Token
        order: 24
      password:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: Password to connect to Kubernetes
        order: 25
      trustCerts:
        kind: parameter
        group: security
        label: security
        type: boolean
        javaType: java.lang.Boolean
        deprecated: false
        secret: true
        description: Define if the certs we used are trusted anyway or not
        order: 26
      username:
        kind: parameter
        group: security
        label: security
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: true
        description: Username to connect to Kubernetes
        order: 27
  documentation.adoc: |
    [[Kubernetes-KubernetesComponent]]
    Kubernetes Component
    ~~~~~~~~~~~~~~~~~~~~

    *Available as of Camel 2.17*

    The *Kubernetes* component is a component for integrating your
    application with Kubernetes standalone or on top of Openshift. 

    Maven users will need to add the following dependency to
    their `pom.xml` for this component:

    [source,xml]
    ------------------------------------------------------------
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-kubernetes</artifactId>
        <version>x.x.x</version>
        <!-- use the same version as your Camel core version -->
    </dependency>
    ------------------------------------------------------------

    [[Kubernetes-URIformat]]
    URI format
    ^^^^^^^^^^

    [source,java]
    ------------------------------
    kubernetes:masterUrl[?options]
    ------------------------------

    You can append query options to the URI in the following
    format, `?option=value&option=value&...`

    [[Kubernetes-Options]]
    Options
    ^^^^^^^


    // component options: START
    The Kubernetes component has no options.
    // component options: END








    // endpoint options: START
    The Kubernetes component supports 28 endpoint options which are listed below:

    {% raw %}
    [width="100%",cols="2,1,1m,1m,5",options="header"]
    |=======================================================================
    | Name | Group | Default | Java Type | Description
    | masterUrl | common |  | String | *Required* Kubernetes Master url
    | apiVersion | common |  | String | The Kubernetes API Version to use
    | category | common |  | String | *Required* Kubernetes Producer and Consumer category
    | dnsDomain | common |  | String | The dns domain used for ServiceCall EIP
    | kubernetesClient | common |  | DefaultKubernetesClient | Default KubernetesClient to use if provided
    | portName | common |  | String | The port name used for ServiceCall EIP
    | bridgeErrorHandler | consumer | false | boolean | Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
    | labelKey | consumer |  | String | The Consumer Label key when watching at some resources
    | labelValue | consumer |  | String | The Consumer Label value when watching at some resources
    | namespace | consumer |  | String | The namespace
    | poolSize | consumer | 1 | int | The Consumer pool size
    | resourceName | consumer |  | String | The Consumer Resource Name we would like to watch
    | exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
    | exchangePattern | consumer (advanced) |  | ExchangePattern | Sets the exchange pattern when the consumer creates an exchange.
    | operation | producer |  | String | Producer operation to do on Kubernetes
    | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
    | caCertData | security |  | String | The CA Cert Data
    | caCertFile | security |  | String | The CA Cert File
    | clientCertData | security |  | String | The Client Cert Data
    | clientCertFile | security |  | String | The Client Cert File
    | clientKeyAlgo | security |  | String | The Key Algorithm used by the client
    | clientKeyData | security |  | String | The Client Key data
    | clientKeyFile | security |  | String | The Client Key file
    | clientKeyPassphrase | security |  | String | The Client Key Passphrase
    | oauthToken | security |  | String | The Auth Token
    | password | security |  | String | Password to connect to Kubernetes
    | trustCerts | security |  | Boolean | Define if the certs we used are trusted anyway or not
    | username | security |  | String | Username to connect to Kubernetes
    |=======================================================================
    {% endraw %}
    // endpoint options: END







    [[Kubernetes-Headers]]
    Headers
    ^^^^^^^

    [width="100%",cols="10%,10%,80%",options="header",]
    |=======================================================================
    |Name |Type |Description

    |CamelKubernetesOperation |String |The Producer operation

    |CamelKubernetesNamespaceName |String |The Namespace name

    |CamelKubernetesNamespaceLabels |Map |The Namespace Labels

    |CamelKubernetesServiceLabels |Map |The Service labels

    |CamelKubernetesServiceName |String |The Service name

    |CamelKubernetesServiceSpec |io.fabric8.kubernetes.api.model.ServiceSpec |The Spec for a Service

    |CamelKubernetesReplicationControllersLabels |Map |Replication controller labels

    |CamelKubernetesReplicationControllerName |String |Replication controller name

    |CamelKubernetesReplicationControllerSpec |io.fabric8.kubernetes.api.model.ReplicationControllerSpec |The Spec for a Replication Controller

    |CamelKubernetesReplicationControllerReplicas |Integer |The number of replicas for a Replication Controller during the Scale operation

    |CamelKubernetesPodsLabels |Map |Pod labels

    |CamelKubernetesPodName |String |Pod name

    |CamelKubernetesPodSpec |io.fabric8.kubernetes.api.model.PodSpec |The Spec for a Pod

    |CamelKubernetesPersistentVolumesLabels |Map |Persistent Volume labels

    |CamelKubernetesPersistentVolumesName |String |Persistent Volume name

    |CamelKubernetesPersistentVolumesClaimsLabels |Map |Persistent Volume Claim labels

    |CamelKubernetesPersistentVolumesClaimsName |String |Persistent Volume Claim name

    |CamelKubernetesPersistentVolumesClaimsSpec |io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpec |The Spec for a Persistent Volume claim

    |CamelKubernetesSecretsLabels |Map |Secret labels

    |CamelKubernetesSecretsName |String |Secret name

    |CamelKubernetesSecret |io.fabric8.kubernetes.api.model.Secret |A Secret Object

    |CamelKubernetesResourcesQuotaLabels |Map |Resource Quota labels

    |CamelKubernetesResourcesQuotaName |String |Resource Quota name

    |CamelKubernetesResourceQuotaSpec |io.fabric8.kubernetes.api.model.ResourceQuotaSpec |The Spec for a Resource Quota

    |CamelKubernetesServiceAccountsLabels |Map |Service Account labels

    |CamelKubernetesServiceAccountName |String |Service Account name

    |CamelKubernetesServiceAccount |io.fabric8.kubernetes.api.model.ServiceAccount |A Service Account object

    |CamelKubernetesNodesLabels |Map |Node labels

    |CamelKubernetesNodeName |String |Node name

    |CamelKubernetesBuildsLabels |Map |Openshift Build labels

    |CamelKubernetesBuildName |String |Openshift Build name

    |CamelKubernetesBuildConfigsLabels |Map |Openshift Build Config labels

    |CamelKubernetesBuildConfigName |String |Openshift Build Config name

    |CamelKubernetesEventAction |io.fabric8.kubernetes.client.Watcher.Action |Action watched by the consumer

    |CamelKubernetesEventTimestamp |String |Timestamp of the action watched by the consumer

    |CamelKubernetesConfigMapName |String |ConfigMap name

    |CamelKubernetesConfigMapsLabels |Map |ConfigMap labels

    |CamelKubernetesConfigData |Map |ConfigMap Data
    |=======================================================================
