---
# Source: syrius-message-broker-amq/templates/050-amq-broker-operator-ingress-network-policy.yaml
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: syrius-message-broker-amq-operator-ingress
spec:
  podSelector:
    matchLabels:
      ActiveMQArtemis: syrius-message-broker-amq
      application: syrius-message-broker-amq-app
  ingress:
    - from:
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: "openshift-operators"
      ports:
        - protocol: TCP
          port: 8161
  policyTypes:
    - Ingress
---
# Source: syrius-message-broker-amq/templates/060-amq-broker-accessors-ingress-network-policy.yaml
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: syrius-message-broker-amq-accessors-ingress
spec:
  podSelector:
    matchLabels:
      ActiveMQArtemis: syrius-message-broker-amq
      application: syrius-message-broker-amq-app
  ingress:
  - from:
      - podSelector: {}
    ports:
      - protocol: TCP
        port: 61626
  policyTypes:
    - Ingress
---
# Source: syrius-message-broker-amq/templates/010-amq-broker-service-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: syrius-message-broker-amq
---
# Source: syrius-message-broker-amq/templates/040-amq-broker-service.yaml
apiVersion: v1
kind: Service
metadata:
  name: syrius-message-broker-amq
spec:
  selector:
    ActiveMQArtemis: syrius-message-broker-amq
    application: syrius-message-broker-amq-app
    statefulset.kubernetes.io/pod-name: syrius-message-broker-amq-ss-0
  ports:
    - name: default
      port: 61626
      protocol: TCP
      targetPort: 61626
  publishNotReadyAddresses: true
  sessionAffinity: None
  type: ClusterIP
---
# Source: syrius-message-broker-amq/templates/030-amq-broker.yaml
apiVersion: broker.amq.io/v2alpha5
kind: ActiveMQArtemis
metadata:
  name: syrius-message-broker-amq
spec:
  version: "7.9.0"
  adminUser: "admin"
  adminPassword: "secret"
  console:
    expose: true
  deploymentPlan:
    size: 1
    clustered: false
    image: "placeholder"
    podSecurity:
      serviceAccountName: syrius-message-broker-amq
    persistenceEnabled: true
    requireLogin: true
    journalType: nio
    jolokiaAgentEnabled: true
    enableMetricsPlugin: false
    resources:
      limits:
        cpu: "1"
        memory: 2048M
      requests:
        cpu: "1"
        memory: 2048M
    storage:
      size: "2Gi"
  acceptors:
    - name: "internal"
      protocols: "core,openwire"
      port: 61626
---
# Source: syrius-message-broker-amq/templates/070-amq-broker-queue.yaml
apiVersion: broker.amq.io/v2alpha3
kind: ActiveMQArtemisAddress # https://github.com/rh-messaging/activemq-artemis-operator/blob/7.9.0.OPR.1.GA/deploy/crds/broker_activemqartemisaddress_crd.yaml#L17
metadata:
  name: syrius-message-broker-amq-queue-1865877872
spec:
  addressName: "test.calculationResults"
  queueName: "test.calculationResults"
  routingType: anycast
  applyToCrNames:
    - syrius-message-broker-amq
---
# Source: syrius-message-broker-amq/templates/080-amq-broker-topic.yaml
apiVersion: broker.amq.io/v2alpha3
kind: ActiveMQArtemisAddress # https://github.com/rh-messaging/activemq-artemis-operator/blob/7.9.0.OPR.1.GA/deploy/crds/broker_activemqartemisaddress_crd.yaml#L17
metadata:
  name: syrius-message-broker-amq-topic-3901563639
spec:
  addressName: "syrius.corporg.bpm.bpas.businessprocessregistry.ingress"
  queueName: "handleBusinessEventNotification"
  routingType: multicast
  queueConfiguration:
    durable: true
---
# Source: syrius-message-broker-amq/templates/020-amq-broker-security.yaml
apiVersion: broker.amq.io/v1alpha1
kind: ActiveMQArtemisSecurity
metadata:
  name: syrius-message-broker-amq-security
spec:
  applyToCrNames:
    - syrius-message-broker-amq
  loginModules:
    propertiesLoginModules:
      - name: "prop-module"
        users:
          - name: batch-user
            password: "mysecret"
            roles:
              - batchRole
          - name: syrius-erp-application-server
            password: "mysecret"
            roles:
              - userRole
  securityDomains:
    brokerDomain:
      name: "activemq"
      loginModules:
        - name: "prop-module"
          flag: "sufficient"
  securitySettings:
    broker:
      - match: "#"
        permissions:
          - operationType: "createNonDurableQueue"
            roles:
              - admin
          - operationType: "deleteNonDurableQueue"
            roles:
              - admin
          - operationType: "createDurableQueue"
            roles:
              - admin
          - operationType: "deleteDurableQueue"
            roles:
              - admin
          - operationType: "createAddress"
            roles:
              - admin
          - operationType: "deleteAddress"
            roles:
              - admin
          - operationType: "consume"
            roles:
              - admin
              - userRole
              - batchRole
          - operationType: "browse"
            roles:
              - admin
              - userRole
              - batchRole
          - operationType: "send"
            roles:
              - admin
              - userRole
              - batchRole
          - operationType: "manage"
            roles:
              - admin
              - userRole
              - batchRole
---
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: deny-by-default
spec:
  podSelector: {}
  ingress: []
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-from-openshift-ingress
spec:
  ingress:
    - from:
        - namespaceSelector:
            matchLabels:
              network.openshift.io/policy-group: ingress
  podSelector: {}
  policyTypes:
    - Ingress

