Chapter 15. Service Registry Operator configuration reference

This chapter provides detailed information on the custom resource used to configure the Service Registry Operator to deploy Service Registry:

15.1. Service Registry Custom Resource

The Service Registry Operator defines an ApicurioRegistry custom resource (CR) that represents a single deployment of Service Registry on OpenShift.

These resource objects are created and maintained by users to instruct the Service Registry Operator how to deploy and configure Service Registry.

Example ApicurioRegistry CR

The following command displays the ApicurioRegistry resource:

oc edit apicurioregistry example-apicurioregistry
apiVersion: apicur.io/v1alpha1
kind: ApicurioRegistry
metadata:
  name: example-apicurioregistry
  namespace: demo-streams
  # ...
spec:
  configuration:
    persistence: streams
    streams:
      bootstrapServers: 'my-cluster-kafka-bootstrap.demo-streams.svc:9092'
  deployment:
    host: >-
      example-apicurioregistry.demo-streams.example.com
status:
  deploymentName: example-apicurioregistry-deployment-qsdb7
  host: >-
    example-apicurioregistry.demo-streams.example.com
  image: >-
    registry.redhat.io/integration/service-registry-streams-rhel8@sha256:4b56da802333d2115cb3a0acc8d97445bd0dab67b639c361816df27b7f1aa296
  ingressName: example-apicurioregistry-ingress-7mlnw
  replicaCount: 1
  serviceName: example-apicurioregistry-service-xvnmz
Important

The Service Registry Operator currently only watches its own project namespace. Therefore you must create the ApicurioRegistry CR in the same namespace.

15.2. Service Registry CR spec

The spec is the part of the ApicurioRegistry CR that is used to provide the desired state or configuration for the Operator to achieve.

ApicurioRegistry CR spec contents

The following example block contains the full tree of possible spec configuration options. Some fields may not be required or should not be defined at the same time.

spec:
  configuration:
    persistence: <string>
    dataSource:
      url: <string>
      userName: <string>
      password: <string>
    kafka:
      bootstrapServers: <string>
    streams:
      bootstrapServers: <string>
      applicationId: <string>
      applicationServerPort: <string>
      security:
        tls:
          truststoreSecretName: <string>
          keystoreSecretName: <string>
        scram:
          mechanism: <string>
          truststoreSecretName: <string>
          user: <string>
          passwordSecretName: <string>
    infinispan:
      clusterName: <string>
    ui:
      readOnly: <string>
    logLevel: <string>
  deployment:
    replicas: <int32>
    host: <string>

The following table describes each configuration option:

Table 15.1. ApicurioRegistry CR spec configuration options

Configuration optiontypeDefault valueDescription

configuration

-

-

Section for configuration of Service Registry application

configuration/persistence

string

mem

Storage backend. One of jpa, streams, infinispan

configuration/dataSource

-

-

Database connection configuration for JPA storage backend

configuration/dataSource/url

string

required

Database connection URL string

configuration/dataSource/userName

string

required

Database connection user

configuration/dataSource/password

string

empty

Database connection password

configuration/streams

-

-

Kafka Streams storage backend configuration

configuration/streams/bootstrapServers

string

required

Kafka bootstrap server URL, for Streams storage backend

configuration/streams/applicationId

string

ApicurioRegistry CR name

Kafka Streams application ID

configuration/streams/applicationServerPort

string

9000

-

configuration/streams/security/tls

-

-

Section to configure TLS authentication for Kafka Streams storage backend

configuration/streams/security/tls/truststoreSecretName

string

required

Name of a secret containing TLS truststore for Kafka

configuration/streams/security/tls/keystoreSecretName

string

required

Name of a secret containing user TLS keystore

configuration/streams/security/scram/truststoreSecretName

string

required

Name of a secret containing TLS truststore for Kafka

configuration/streams/security/scram/user

string

required

SCRAM user name

configuration/streams/security/scram/passwordSecretName

string

required

Name of a secret containing SCRAM user password

configuration/streams/security/scram/mechanism

string

SCRAM-SHA-512

SASL mechanism

configuration/infinispan

-

-

Infinispan persistence configuration section

configuration/infinispan/clusterName

string

ApicurioRegistry CR name

Infinispan cluster name

configuration/ui

-

-

Service Registry web console settings

configuration/ui/readOnly

string

false

Set Service Registry web console to read-only mode

configuration/logLevel

string

INFO

Service Registry operand log level. One of INFO, DEBUG

deployment

-

-

Section for operand deployment settings

deployment/replicas

positive integer

1

Number of Service Registry pods to deploy

deployment/host

string

auto-generated from ApicurioRegistry CR name and namespace

Host/URL where the Service Registry console and API are available

Note

If an option is marked as required, it might be conditional on other configuration options being enabled. Empty values might be accepted, but the Operator does not perform the specified action.

15.3. Service Registry CR status

The status is the section of the CR managed by the Service Registry Operator that contains a description of the current deployment and application state.

ApicurioRegistry CR status contents

The status section contains the following fields:

status:
  image: <string>
  deploymentName: <string>
  serviceName: <string>
  ingressName: <string>
  replicaCount: <int32>
  host: <string>

Table 15.2. ApicurioRegistry CR status fields

Status fieldTypeDescription

image

string

Service Registry operand image that the Operator deploys. Might change based on the storage option selected in configuration.

deploymentName

string

Name of the Deployment or DeploymentConfig managed by the Operator, used to deploy the Service Registry.

serviceName

string

Name of the Service managed by the Operator, to expose the Service Registry operand as a service.

ingressName

string

Name of the Ingress managed by the Operator, to make the Service Registry accessible via HTTP. A Route is also created on OCP.

replicaCount

int32

Number of Service Registry operand pods deployed.

host

string

URL where the Service Registry UI and REST API are accessible.

15.4. Service Registry managed resources

The resources managed by the Service Registry Operator when deploying Service Registry are as follows:

  • DeploymentConfig
  • Service
  • Ingress
  • Route
  • PodDisruptionBudget

15.5. Service Registry Operator labels

Resources managed by the Service Registry Operator are usually labeled as follows:

Table 15.3. Service Registry Operator labels for managed resources

LabelDescription

app

Name of the Service Registry deployment that the resource belongs to, based on the name of the specified ApicurioRegistry CR.

apicur.io/type

Type of the deployment: apicurio-registry or operator

apicur.io/name

Name of the deployment: same value as app or apicurio-registry-operator

apicur.io/version

Version of the Service Registry or the Service Registry Operator

app.kubernetes.io/*

A set of recommended Kubernetes labels for application deployments.

com.company and rht.*`

Metering labels for Red Hat products.