- Deploying KAS Fleet Manager to OpenShift
Create a namespace where KAS Fleet Manager will be deployed to
make deploy/project <OPTIONAL_PARAMETERS>
Optional parameters:
NAMESPACE
: The namespace where the image will be pushed to. Defaults to 'kas-fleet-manager-$USER.'
Login to the OpenShift cluster
NOTE: Ensure that the user used has the correct permissions to push to the OpenShift image registry. For more information, see the accessing the registry guide.
oc login <api-url> -u <username> -p <password>
Build and push the image to the logged in OpenShift cluster's image registry
# Build and push the image to the OpenShift image registry.
GOARCH=amd64 GOOS=linux CGO_ENABLED=0 make image/build/push/internal <OPTIONAL_PARAMETERS>
Optional parameters:
NAMESPACE
: The namespace where the image will be pushed to. Defaults to 'kas-fleet-manager-$USER.'IMAGE_TAG
: Tag for the image. Defaults to a timestamp captured when the command is run (i.e. 1603447837).
Login to Docker or Quay
-
A make target is available for logging into Quay.io
make docker/login QUAY_USER="<username>" QUAY_TOKEN="<password>" <OPTIONAL_PARAMETERS>
Optional parameters:
DOCKER_CONFIG
: The path to your docker config. Defaults to {current_directory}/.docker
Build and push the KAS Fleet Manager image to your own repository
make image/push external_image_registry="<your-image-registry>" image_repository="<your-image-repository>" <OPTIONAL_PARAMETERS>
Optional parameters:
image_tag
: Tag for the image. Defaults to a timestamp captured when the command is run (i.e. 1603447837).
make deploy/db <OPTIONAL_PARAMETERS>
Optional parameters:
NAMESPACE
: The namespace to be created. Defaults to 'kas-fleet-manager-$USER.'
This will create the following secrets in the given namespace:
kas-fleet-manager
kas-fleet-manager-dataplane-certificate
kas-fleet-manager-observatorium-configuration-red-hat-sso
kas-fleet-manager-rds
make deploy/secrets <OPTIONAL_PARAMETERS>
Optional parameters:
NAMESPACE
: The namespace where the secrets will be created in. Defaults to 'kas-fleet-manager-$USER.'OCM_SERVICE_CLIENT_ID
: The client id for an OCM service account. Defaults to value read from ./secrets/ocm-service.clientIdOCM_SERVICE_CLIENT_SECRET
: The client secret for an OCM service account. Defaults to value read from ./secrets/ocm-service.clientSecretOCM_SERVICE_TOKEN
: An offline token for an OCM service account. Defaults to value read from ./secrets/ocm-service.tokenSENTRY_KEY
: Token used to authenticate with Sentry. Defaults to value read from ./secrets/sentry.keyAWS_ACCESS_KEY
: The access key of an AWS account used to provision OpenShift clusters. Defaults to value read from ./secrets/aws.accesskeyAWS_ACCOUNT_ID
: The account id of an AWS account used to provision OpenShift clusters. Defaults to value read from ./secrets/aws.accountidAWS_SECRET_ACCESS_KEY
: The secret access key of an AWS account used to provision OpenShift clusters. Defaults to value read from ./secrets/aws.secretaccesskeyROUTE53_ACCESS_KEY
: The access key of an AWS account that has Route53 permissions. Defaults to value read from ./secrets/aws.route53accesskeyROUTE53_SECRET_ACCESS_KEY
: The secret access key of an AWS account that has Route53 permissions. Defaults to value read from ./secrets/aws.route53secretaccesskeyOBSERVATORIUM_SERVICE_TOKEN
: Offline token used to interact with Observatorium. Defaults to value read from ./secrets/observatorium.tokenDEX_SECRET
: Dex secret used to authenticate to an Observatorium instance using Dex as authentication. Defaults to value read from ./secrets/dex.secretDEX_PASSWORD
: Dex password used to authenticate to an Observatorium instance using Dex as authentication. Defaults to value read from ./secrets/dex.secretMAS_SSO_CLIENT_ID
: The client id for a MAS SSO service account. Defaults to value read from ./secrets/keycloak-service.clientIdMAS_SSO_CLIENT_SECRET
: The client secret for a MAS SSO service account. Defaults to value read from ./secrets/keycloak-service.clientSecretMAS_SSO_CRT
: The TLS certificate of the MAS SSO instance. Defaults to value read from ./secrets/keycloak-service.crtMAS_SSO_INSECURE
: Skip TLS insecure verification for the connection to a MAS SSO instance. Defaults to value false.OSD_IDP_MAS_SSO_CLIENT_ID
: The client id for a MAS SSO service account used to configure OpenShift identity provider. Defaults to value read from ./secrets/osd-idp-keycloak-service.clientIdREDHAT_SSO_CLIENT_ID
: The client id for a REDHAT SSO service account. Defaults to value read from ./secrets/redhatsso-service.clientIdREDHAT_SSO_CLIENT_SECRET
: The client secret for a REDHAT SSO service account. Defaults to value read from ./secrets/redhatsso-service.clientSecretOSD_IDP_MAS_SSO_CLIENT_SECRET
: The client secret for a MAS SSO service account used to configure OpenShift identity provider. Defaults to value read from ./secrets/osd-idp-keycloak-service.clientSecretIMAGE_PULL_DOCKER_CONFIG
: Base64 encoded Docker config content for pulling private images. Defaults to value read from ./secrets/image-pull.dockerconfigjsonKUBE_CONFIG
: Base64 encoded Kubeconfig content for standalone dataplane clusters communication. Defaults to''
OBSERVABILITY_RHSSO_LOGS_CLIENT_ID
: The client id for a RHSSO service account that has read logs permission. Defaults to vaue read from ./secrets/rhsso-logs.clientIdOBSERVABILITY_RHSSO_LOGS_SECRET
: The client secret for a RHSSO service account that has read logs permission. Defaults to vaue read from ./secrets/rhsso-logs.clientSecretOBSERVABILITY_RHSSO_METRICS_CLIENT_ID
: The client id for a RHSSO service account that has remote-write metrics permission. Defaults to vaue read from ./secrets/rhsso-metrics.clientIdOBSERVABILITY_RHSSO_METRICS_SECRET
: The client secret for a RHSSO service account that has remote-write metrics permission. Defaults to vaue read from ./secrets/rhsso-metrics.clientSecretOBSERVABILITY_RHSSO_METRICS_CLIENT_ID
: The client id for a RHSSO service account that has read metrics permission. Defaults to''
OBSERVABILITY_RHSSO_METRICS_SECRET
: The client secret for a RHSSO service account that has read metrics permission. Defaults to''
JWKS_VERIFY_INSECURE
: Skip TLS insecure verification for the connection for fetching jwks certificate. Defaults to value false.
NOTE: This is only needed if your Observatorium instance is using RHSSO as authentication.
make deploy/token-refresher <OPTIONAL_PARAMETERS>
Optional parameters
OBSERVATORIUM_URL
: URL of the Observatorium instance to connect to. Defaults tohttps://observatorium-mst.api.stage.openshift.com/api/metrics/v1/managedkafka
ISSUER_URL
: The issuer URL of your authentication service. Defaults tohttps://sso.redhat.com/auth/realms/redhat-external
OBSERVATORIUM_TOKEN_REFRESHER_IMAGE
: The image repository used for the Observatorium token refresher deployment. Defaults toquay.io/rhoas/mk-token-refresher
.OBSERVATORIUM_TOKEN_REFRESHER_IMAGE_TAG
: The image tag used for the Observatorium token refresher deployment. Defaults tolatest
OBSERVATORIUM_TOKEN_REFRESHER_REPLICAS
: The number of replicas of the Observatorium token refresher deployment. Defaults to1
.
make deploy/service IMAGE_TAG=<your-image-tag-here> <OPTIONAL_PARAMETERS>
Required parameters:
IMAGE_TAG
: KAS Fleet Manager image tag.
Optional parameters:
NAMESPACE
: The namespace where the service will be deployed to. Defaults to managed-services-$USER.FLEET_MANAGER_ENV
: Environment used for the KAS Fleet Manager deployment. Options:development
,integration
,testing
,stage
andproduction
, Default:development
.IMAGE_REGISTRY
: Registry used by the image. Defaults to the OpenShift internal registry.IMAGE_REPOSITORY
: Image repository. Defaults to '<namespace>/kas-fleet-manager'.REPLICAS
: Number of replicas of the KAS Fleet Manager deployment. Defaults to1
.ENABLE_KAFKA_EXTERNAL_CERTIFICATE
: Enable Kafka TLS Certificate. Defaults tofalse
.ENABLE_KAFKA_CNAME_REGISTRATION
: Enable Kafka DNS CNAME Registration. Defaults tofalse
.ENABLE_KAFKA_LIFE_SPAN
: Enables Kafka expiration. Defaults tofalse
.ENABLE_OCM_MOCK
: Enables use of a mocked ocm client. Defaults tofalse
.OCM_MOCK_MODE
: The type of mock to use when ocm mock is enabled.Options:emulate-server
andstub-server
. Defaults toemulate-server
.OCM_URL
: OCM API base URL. Defaults tohttps://api.stage.openshift.com
.AMS_URL
: AMS API base URL. Defaults tohttps://api.stage.openshift.com
.JWKS_URL
: JWK Token Certificate URL. Defaults to''
.MAS_SSO_ENABLE_AUTH
: Enables MAS SSO authentication for the Data Plane. Defaults totrue
.MAS_SSO_BASE_URL
: MAS SSO base url. Defaults tohttps://identity.api.stage.openshift.com
.MAS_SSO_REALM
: MAS SSO realm url. Defaults torhoas
.SSO_SPECIAL_MANAGEMENT_ORG_ID
: Special Management Organization ID used for creating internal Service accounts. Defaults to13640203
which is the special management organisation id organisation id for Stage environment.MAX_ALLOWED_SERVICE_ACCOUNTS
: The default value of maximum number of service accounts that can be created by users. Defaults to2
.SERVICE_ACCOUNT_LIMIT_CHECK_SKIP_ORG_ID_LIST
: A list of Org Ids for which service account limit checks dont apply. Defaults to empty list.MAX_LIMIT_FOR_SSO_GET_CLIENTS
: The default value of maximum number of clients fetch from mas-sso. Defaults to100
.OSD_IDP_MAS_SSO_REALM
: MAS SSO realm for configuring OpenShift Cluster Identity Provider Clients. Defaults torhoas-kafka-sre
.TOKEN_ISSUER_URL
: A token issuer url used to validate if JWT token used are coming from the given issuer. Defaults tohttps://sso.redhat.com/auth/realms/redhat-external
.OBSERVATORIUM_AUTH_TYPE
: Authentication type for the Observability stack. Options:dex
andredhat
, Default:dex
.DEX_USERNAME
: Username that will be used to authenticate with an Observatorium using Dex as authentication. Defaults to[email protected]
.ENABLE_DENY_LIST
: Enable the deny list access control feature. Defaults tofalse
.ENABLE_ACCESS_LIST
: Enable the Access list access control feature. Defaults tofalse
.DENIED_USERS
: A list of denied users that are not allowed to access the service. A user is identified by its username. Defaults to[]
.ACCEPTED_ORGANISATIONS
: A list of accepted organisations that are allowed to access the service. An organisation is identified by its orgId. Defaults to[]
.DEX_URL
: Dex URL. Defaults tohttp://dex-dex.apps.pbraun-observatorium.observability.rhmw.io
.OBSERVATORIUM_GATEWAY
: URL of an Observatorium using Dex as authentication. Defaults tohttps://observatorium-observatorium.apps.pbraun-observatorium.observability.rhmw.io
.OBSERVATORIUM_TENANT
: Tenant of an Observatorium using Dex as authentication. Defaults totest
.OBSERVATORIUM_RHSSO_GATEWAY
: URL of an Observatorium using RHSSO as authentication. Defaults to''
.OBSERVATORIUM_RHSSO_TENANT
: Tenant of an Observatorium using RHSSO as authentication. Defaults to''
.OBSERVATORIUM_RHSSO_AUTH_SERVER_URL
: RHSSO auth server URL used for Observatorium authentication. Defaults to''
.OBSERVATORIUM_RHSSO_REALM
: Realm of RHSSO used for Observatorium authentication. Defaults to''
.OBSERVABILITY_CONFIG_REPO
: URL of the configuration repository used by the Observability stack. Defaults tohttps://api.github.com/repos/bf2fc6cc711aee1a0c2a/observability-resources-mk/contents
.ENABLE_TERMS_ACCEPTANCE
: Enables terms acceptance through AMS. Defaults tofalse
.ALLOW_DEVELOPER_INSTANCE
: Enables creation of developer Kafka instances. Defaults totrue
.QUOTA_TYPE
: Quota management service to be used. Options:quota-management-list
andams
, Default:quota-management-list
.KAS_FLEETSHARD_OLM_INDEX_IMAGE
: KAS Fleetshard operator OLM index image. Defaults toquay.io/osd-addons/kas-fleetshard-operator:production-82b42db
.STRIMZI_OLM_INDEX_IMAGE
: Strimzi operator OLM index image. Defaults toquay.io/osd-addons/managed-kafka:production-82b42db
.OBSERVABILITY_OPERATOR_INDEX_IMAGE
: Observability Operator index image. Defaults toquay.io/rhoas/observability-operator-index:v4.0.2
.DATAPLANE_CLUSTER_SCALING_TYPE
: Dataplane cluster scaling type. Options:manual
,auto
andnone
, Defaults:manual
.CLUSTER_LOGGING_OPERATOR_ADDON_ID
: The id of the cluster logging operator addon. Defaults to''
.STRIMZI_OPERATOR_ADDON_ID
: The id of the Strimzi operator addon. Defaults tomanaged-kafka-qe
.KAS_FLEETSHARD_ADDON_ID
: The id of the kas-fleetshard operator addon. Defaults tokas-fleetshard-operator-qe
.CLUSTER_LIST
: The list of data plane cluster configuration to be used. This is to be used when scaling type ismanual
. Defaults to empty list.SUPPORTED_CLOUD_PROVIDERS
: A list of supported cloud providers in a yaml format. Defaults to[{name: aws, default: true, regions: [{name: us-east-1, default: true, supported_instance_type: {standard: {}, developer: {}}}]}]
.STRIMZI_OLM_PACKAGE_NAME
: Strimzi operator OLM package name. This is optional and to be defined when interacting with standalone data plane clusters. Defaults tomanaged-kafka
.KAS_FLEETSHARD_OLM_PACKAGE_NAME
: kas-fleetshard operator OLM package name. This is optional and to be defined when interacting with standalone data plane clusters. Defaults tokas-fleetshard-operator
.STRIMZI_OPERATOR_STARTING_CSV
: Strimzi operator starting csv. This is only applied for standalone clusters. Defaults to empty stringKAS_FLEETSHARD_OPERATOR_STARTING_CSV
: Kas-fleetshard operator starting csv. This is only applied for standalone clusters. Defaults to empty stringOBSERVABILITY_OPERATOR_STARTING_CSV
: Observability Operator starting CSV. Defaults toobservability-operator.v4.0.2
.KAS_FLEETSHARD_OPERATOR_SUBSCRIPTION_CONFIG
: Kas-fleetshard operator subscription config. This is applied for standalone clusters only. The configuration must be of type SubscriptionConfig. Defaults to an empty object i.e{}
. See the config/kas-fleetshard-operator-subscription-spec-config.yaml file for example values.STRIMZI_OPERATOR_SUBSCRIPTION_CONFIG
: Strimzi operator subscription config. This is applied for standalone clusters only. The configuration must be of type SubscriptionConfig. Defaults to an empty object i.e{}
. See the config/strimzi-operator-subscription-spec-config.yaml file for example values.SSO_PROVIDER_TYPE
: Option to choose between sso providers i.e, mas_sso or redhat_sso, mas_sso by default.REGISTERED_USERS_PER_ORGANISATION
: The list of allowed organisations that are able to create STANDARD kafka instances. This will only be applicable ifQUOTA_TYPE
is set to quota-management-list. Defaults to"[{id: 13640203, any_user: true, max_allowed_instances: 5, registered_users: [], granted_quota: [{instance_type_id: standard, kafka_billing_models: [{id: standard, max_allowed_instances: 5}, {id: marketplace, max_allowed_instances: 5}, {id: enterprise, max_allowed_instances: 5}]}]}, {id: 12147054, any_user: true, max_allowed_instances: 1, registered_users: [], granted_quota: [{instance_type_id: standard, kafka_billing_models: [{id: standard, max_allowed_instances: 1}, {id: enterprise, max_allowed_instances: 1}]}]}, {id: 13639843, any_user: true, max_allowed_instances: 1, registered_users: [], granted_quota: [{instance_type_id: standard, kafka_billing_models: [{id: standard, max_allowed_instances: 1}, {id: enterprise, max_allowed_instances: 1}]}]}, {id: 13785172, any_user: true, max_allowed_instances: 1, registered_users: [], granted_quota: [{instance_type_id: standard, kafka_billing_models: [{id: standard, max_allowed_instances: 1}, {id: enterprise, max_allowed_instances: 1}]}]}, {id: 13645369, any_user: true, max_allowed_instances: 3, registered_users: [], granted_quota: [{instance_type_id: standard, kafka_billing_models: [{id: standard, max_allowed_instances: 3}, {id: enterprise, max_allowed_instances: 3}]}]}] "
DYNAMIC_SCALING_CONFIG
: The configuration file that contains information about each Kafka instance types, dynamic scaling configuration. Defaults to"{new_data_plane_openshift_version: '', enable_dynamic_data_plane_scale_up: false, enable_dynamic_data_plane_scale_down: false, compute_machine_per_cloud_provider: {aws: {cluster_wide_workload: {compute_machine_type: m5.2xlarge, compute_node_autoscaling: {min_compute_nodes: 3, max_compute_nodes: 18}}, kafka_workload_per_instance_type: {standard: {compute_machine_type: r5.xlarge, compute_node_autoscaling: {min_compute_nodes: 3, max_compute_nodes: 18}}, developer: {compute_machine_type: m5.2xlarge, compute_node_autoscaling: {min_compute_nodes: 1, max_compute_nodes: 3}}}}, gcp: {cluster_wide_workload: {compute_machine_type: custom-8-32768, compute_node_autoscaling: {min_compute_nodes: 3, max_compute_nodes: 18}}, kafka_workload_per_instance_type: {standard: {compute_machine_type: custom-8-32768, compute_node_autoscaling: {min_compute_nodes: 3, max_compute_nodes: 18}}, developer: {compute_machine_type: custom-8-32768, compute_node_autoscaling: {min_compute_nodes: 1, max_compute_nodes: 3}}}}}}"
NODE_PREWARMING_CONFIG
: The configuration file that contains information about each Kafka instance types, node prewarming configuration. Defaults to"{}"
ADMIN_AUTHZ_CONFIG
: Configuration file containing endpoints and roles mappings used to grant access to admin API endpoints, Defaults to"[{method: GET, roles: [kas-fleet-manager-admin-full, kas-fleet-manager-admin-read, kas-fleet-manager-admin-write]}, {method: PATCH, roles: [kas-fleet-manager-admin-full, kas-fleet-manager-admin-write]}, {method: DELETE, roles: [kas-fleet-manager-admin-full]}] "
ADMIN_API_SSO_BASE_URL
: Base URL of admin API endpints SSO. Defaults to"https://auth.redhat.com"
ADMIN_API_SSO_ENDPOINT_URI
: admin API SSO endpoint URI. defaults to"/auth/realms/EmployeeIDP"
ADMIN_API_SSO_REALM
: admin API SSO realm. Defaults to"EmployeeIDP"
If you are using a private external registry, a docker pull secret must be created in the namespace where KAS Fleet Manager is deployed and linked to the service account that KAS Fleet Manager uses.
Create a docker pull secret with credentials that has access to pull the KAS Fleet Manager image from the private external registry.
oc create secret generic kas-fleet-manager-pull-secret \
--from-file=.dockerconfigjson=<path-to-docker-config-json> \
--type=kubernetes.io/dockerconfigjson
Link the pull secret to the KAS Fleet Manager service account
oc secrets link kas-fleet-manager kas-fleet-manager-pull-secret --for=pull
Delete the KAS Fleet Manager pod(s) to restart the deployment
oc get pods -n <namespace>
oc delete pod <kas-fleet-manager-pod>
The service can be accessed by via the host of the route created by the service deployment.
oc get route kas-fleet-manager
# Removes all resources created on service deployment
make undeploy
Optional parameters:
NAMESPACE
: The namespace where the KAS Fleet Manager resources will be removed from. Defaults to managed-services-$USER.