DxOperator API Reference
This document provides a technical reference of the Custom Resources used by DxOperator. It includes an exhaustive list of all configuration options available.
DxEnterpriseSqlAg
A DxEnterpriseSqlAg represents one deployment of a Microsoft SQL Server Availability Group cluster.
| Group | Version | Kind | 
|---|---|---|
| dh2i.com | v1 | DxEnterpriseSqlAg | 
| Field | Description | 
|---|---|
| apiVersionstring | 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 | 
| kindstring | 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 | 
| metadataObjectMeta | Standard object's metadata. More info | 
| specSqlAgSpec | spec defines the desired characteristics of the DxEnterprisSqlAg cluster. | 
| statusSqlAgStatus | status represents the current information/status of a DxEnterpriseSqlAg. Read-only. | 
SqlAgSpec
Appears in:
| Field | Description | 
|---|---|
| templateSqlAgPodTemplateSpec | Pod template, to use when creating each pod of the SQL Server Availability Group cluster. | 
| synchronousReplicasinteger | The number of synchronous replicas to create in the SQL Server Availability Group cluster. Valid values are 0-9. The total number of replicas, including asynchronous and configuration-only cannot, exceed 9. | 
| asynchronousReplicasinteger | The number of asynchronous replicas to create in the SQL Server Availability Group cluster. Valid values are 0-9. The total number of replicas, including synchronous and configuration-only cannot, exceed 9. | 
| configurationOnlyReplicasinteger | The number of configuration-only (witness) replicas to create in the SQL Server Availability Group cluster. Valid values are 0-1. The total number of replicas, including synchronous and asynchronous, cannot, exceed 9. | 
| availabilityGroupNamestring | The name of the SQL Server Availability Group, within SQL Server.  This is different from the cluster name.  Defaults to AG1 | 
| availabilityGroupListenerPortinteger | The port number to use to create a SQL Server Availability Group Listener. Must be a valid TCP port number (1-65535) if set. | 
| availabilityGroupClusterTypestring | The CLUSTER_TYPE value to set when creating the SQL Server Availability Group.  Defaults to EXTERNAL.  Set this value toNONEto create a Read-Scale Cluster. | 
| availabilityGroupOptionsstring | Extra options to set when creating the SQL Server Availability Group.  With SQL Server 2022, one useful extra option is CONTAINED.  See Microsoft's Documentation. | 
| createLoadBalancersboolean | Whether or not to create load balancers for external access to the Kubernetes pods.  Defaults to false. | 
SqlAgPodTemplateSpec
Appears in:
| Field | Description | 
|---|---|
| metadataSqlAgPodTemplateSpecMeta | Additional metadata to add to each pod. | 
| specSqlAgPodSpec | Pod specification. | 
SqlAgPodSpec
Appears in:
| Field | Description | 
|---|---|
| mssqlServerContainerMssqlServerContainerSpec | The configuration for the Microsoft SQL Server container | 
| dxEnterpriseContainerDxEnterpriseContainerSpec | The configuration for the DxEnterprise container | 
| affinityAffinity | If specified, the pod's scheduling constraints | 
| containersContainer array | Additional sidecar containers to create with each pod. | 
| dnsConfigPodDNSConfig | Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. | 
| dnsPolicystring | Set DNS policy for the pod. Defaults to "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. | 
| hostAliasesHostAlias array | HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. | 
| imagePullSecretsLocalObjectReference array | ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info | 
| initContainersContainer array | List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info | 
| nodeNamestring | NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. | 
| nodeSelectorobject | NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info | 
| securityContextPodSecurityContext | The pod's security context. FsGroup must be set to 10001 for SQL Server. Default (Kubernetes): fsGroup: 10001; Default (OpenShift):fsGroupChangePolicy: OnRootMismatch | 
| terminationGracePeriodSecondsinteger | Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. | 
| tolerationsToleration array | If specified, the pod's tolerations. | 
| topologySpreadConstraintsTopologySpreadConstraint array | TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed. | 
| volumesvolume array | List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes | 
MssqlServerContainerSpec
Appears in:
| Field | Description | 
|---|---|
| acceptEulaboolean | Whether or not the user accepts the SQL Server EULA | 
| envEnvVar array | List of environment variables to set in the container. Cannot be updated. | 
| envFromEnvFromSource array | List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. | 
| imagestring | The SQL Server container image. Default: mcr.microsoft.com/mssql/server:latest | 
| imagePullPolicystring | The pull policy for the SQL Server image | 
| mssqlConfigMapstring | The name of the ConfigMap that contains configuration info for the mssql.conf file | 
| mssqlPIDstring | The product ID (edition) the SQL Server container will run with, or a license key | 
| mssqlSecretstring | The secret containing the MSSQL_SA_PASSWORD environment variable. | 
| resourcesResourceRequirements | Compute Resources required by this container. Cannot be updated. More info | 
| securityContextSecurityContext | The security context for the SQL Server container. The NET_BIND_SERVICEcapability is added by default in OpenShift clusters. | 
| volumeClaimConfigurationVolumeClaimConfiguration | Configuration options for the required volume claim for SQL Server. | 
| volumeMountsVolumeMount array | Additional pod volumes to mount into the container's filesystem. | 
DxEnterpriseContainerSpec
Appears in:
| Field | Description | 
|---|---|
| acceptEulaboolean | Whether or not the user accepts the DxEnterprise EULA | 
| clusterSecretstring | "The secret containing a DX_PASSKEY, DX_LICENSE, and optional DX_OTPK environment variable(s). | 
| envEnvVar array | List of environment variables to set in the container. Cannot be updated. | 
| envFromEnvFromSource array | List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. | 
| imagestring | The DxEnterprise container image. Default: docker.io/dh2i/dxe:latest | 
| imagePullPolicystring | The pull policy for the DxEnterprise image | 
| joinExistingClusterboolean | DEPRECATED: Use joinTargetinstead. Whether or not to join an existing cluster. The DxEnterprise cluster will join a remote cluster using the DX_OTPK variable set in the clusterSecret | 
| joinTargetTargetConfiguration | A configuration for the external target cluster each pod will join to. | 
| otpkExpirationstring | The date and/or time the OTPK will expire. Default: 1 hour | 
| readinessProbeProbe | Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info | 
| resourcesResourceRequirements | Compute Resources required by this container. Cannot be updated. More info | 
| securityContextSecurityContext | The security context for the DxEnterprise container. Default: null | 
| vhostNamestring | The name of the DxEnterprise Vhost. Default: VHOST1 | 
| volumeClaimConfigurationVolumeClaimConfiguration | Configuration options for the required volume claim for DxEnterprise. | 
| volumeMountsVolumeMount array | Additional pod volumes to mount into the container's filesystem. | 
VolumeClaimConfiguration
Appears in:
| Field | Description | 
|---|---|
| accessModesstring array | accessModes contains the desired access modes the volume should have. More info | 
| storageClassNamestring | storageClassName is the name of the StorageClass required by the claim. More info | 
| resourcesResourceRequirements | resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info | 
SqlAgPodTemplateSpecMeta
| Field | Description | 
|---|---|
| labelsobject | Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info | 
| annotationsobject | Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info | 
SqlAgStatus
Appears in:
| Field | Description | 
|---|---|
| statusstring | The deployment status of the SQL Server Availability Group.  Valid values can include: Ready,Deploying, andError. | 
TargetConfiguration
Appears in:
| Field | Description | 
|---|---|
| targetstring | The target hostname, IP, or FQDN for the join process. | 
| useNatbool | Whether or not the target is a NAT match-making service. |