// Module included in the following assemblies:
//
// assembly-infrastructure-configuration.adoc

[id='con-standard-infra-config-{context}']
= Standard infrastructure configuration

`StandardInfraConfig` resources are used to configure infrastructure deployed by `standard` address
spaces. The standard infrastructure configuration is referenced by address space plans in their
`spec.infraConfigRef` field. For more information, see link:{BookUrlBase}{BaseProductVersion}{BookNameUrl}#con-address-space-plans-messaging[Address space plans].

For detailed information about the available standard infrastructure configuration fields, see the link:{BookUrlBase}{BaseProductVersion}{BookNameUrl}#ref-standard-infra-config-fields-messaging[Standard infrastructure configuration fields table].

[source,yaml,options="nowrap",subs="attributes"]
----
apiVersion: admin.enmasse.io/v1beta1
kind: StandardInfraConfig
metadata:
  name: myconfig
spec:
  version: "{EnMasseVersion}"
  admin:
    resources:
      memory: 256Mi
  broker:
    resources:
      memory: 2Gi
      storage: 100Gi
    addressFullPolicy: PAGE
  router:
    resources:
      memory: 256Mi
    linkCapcity: 1000
    minReplicas: 1
    policy:
      maxConnections: 1000
      maxConnectionsPerHost: 1
      maxConnectionsPerUser: 10
      maxSessionsPerConnection: 10
      maxSendersPerConnection: 5
      maxReceiversPerConnection: 5
    podTemplate:
      spec:
        affinity:
          nodeAffinity:
            preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 1
              preference:
              matchExpressions:
              - key: e2e-az-EastWest
                operator: In
                values:
                - e2e-az-East
                - e2e-az-West
----

The `version` field specifies the {ProductName} version used. When upgrading, {ProductName} uses
this field to determine whether to upgrade the infrastructure to the requested version. If omitted,
the version will be assumed to be the same as the controllers reading the config.

The `admin` object specifies the settings you can configure for the `admin` components.

The `broker` object specifies the settings you can configure for the `broker` components. Changing
the `.broker.resources.storage` setting does not configure the existing broker storage size.

The `router` object specifies the settings you can configure for the `router` components.

For `admin`, `broker` and `router` you can configure `podTemplate` settings like `metadata.labels`,
`spec.priorityClassName`, `spec.tolerations` and `spec.affinity`.

ifeval::["{cmdcli}" == "oc"]
See link:https://docs.openshift.com/container-platform/3.11/admin_guide/scheduling/priority_preemption.html[Pod priority], link:https://docs.openshift.com/container-platform/3.11/admin_guide/scheduling/taints_tolerations.html[Taints and tolerations], and link:https://docs.openshift.com/container-platform/3.11/admin_guide/scheduling/pod_affinity.html[Affinity and anti-affinity] for more information.
endif::[]
ifeval::["{cmdcli}" == "kubectl"]
See link:https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/[Pod priority], link:https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/[Taints and tolerations], and link:https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity[Affinity and anti-affinity] for more information.
endif::[]

