---
apiVersion: capsule.clastix.io/v1alpha1
kind: Tenant
metadata:
  name: oil
spec:
  ingressHostnames:
    allowed:
      - my.oil.acmecorp.com
      - my.gas.acmecorp.com
    allowedRegex: "^.*acmecorp.com$"
  ingressClasses:
    allowed:
      - default
    allowedRegex: ""
  limitRanges:
    -
      limits:
        -
          max:
            cpu: "1"
            memory: 1Gi
          min:
            cpu: 50m
            memory: 5Mi
          type: Pod
        -
          default:
            cpu: 200m
            memory: 100Mi
          defaultRequest:
            cpu: 100m
            memory: 10Mi
          max:
            cpu: "1"
            memory: 1Gi
          min:
            cpu: 50m
            memory: 5Mi
          type: Container
        -
          max:
            storage: 10Gi
          min:
            storage: 1Gi
          type: PersistentVolumeClaim
  namespaceQuota: 3
  networkPolicies:
    -
      egress:
        -
          to:
            -
              ipBlock:
                cidr: 0.0.0.0/0
                except:
                  - 192.168.0.0/12
      ingress:
        -
          from:
            -
              namespaceSelector:
                matchLabels:
                  capsule.clastix.io/tenant: oil
            -
              podSelector: {}
            -
              ipBlock:
                cidr: 192.168.0.0/12
      podSelector: {}
      policyTypes:
        - Ingress
        - Egress
  nodeSelector:
    kubernetes.io/os: linux
  owner:
    kind: User
    name: alice
  resourceQuotas:
    -
      hard:
        limits.cpu: "8"
        limits.memory: 16Gi
        requests.cpu: "8"
        requests.memory: 16Gi
      scopes:
        - NotTerminating
    -
      hard:
        pods: "10"
    -
      hard:
        requests.storage: 100Gi
  storageClasses:
    allowed:
      - default
    allowedRegex: ""
  containerRegistries:
    allowed:
      - docker.io
    allowedRegex: ""
