apiVersion: service.aep.asag.io/v1
kind: Definition
metadata:
  name: k8s-0.4.0
  namespace: asag
spec:
  clusters:
    - flags:
        - from: value
          key: v1_role
          to: label
          value: etcd
      name: etcd
      podspec:
        containers:
          - name: etcd
      provides:
        - exposed: false
          name: etcd
          network: direct
          servicespec:
            ports:
              - name: clients
                port: 2379
                protocol: TCP
                targetPort: 2379
              - name: peers
                port: 2380
                protocol: TCP
                targetPort: 2380
      sizing:
        increment: 1
        initial: 3
        maximum: 10
        minimum: 1
    - flags:
        - from: value
          key: v1_role
          to: label
          value: k8s-api
      name: api
      podspec:
        containers:
          - name: k8s-api
      provides:
        - exposed: true
          name: api
          network: loadbalanced
          servicespec:
            ports:
              - name: api
                port: 6443
                protocol: TCP
                targetPort: 6443
      sizing:
        increment: 1
        initial: 2
        maximum: 10
        minimum: 1
    - annotations:
        x-lxe-additional-lxd-config: |
          raw.lxc: lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file 0 0
      flags:
        - from: value
          key: v1_role
          to: label
          value: k8s-minion
      name: minion
      podspec:
        containers:
          - name: k8s-minion
            securityContext:
              privileged: true
      provides:
        - exposed: true
          name: ingress
          network: loadbalanced
          servicespec:
            ports:
              - name: ingress
                port: 80
                protocol: TCP
              - name: ingress-tls
                port: 443
                protocol: TCP
      sizing:
        increment: 1
        initial: 3
        maximum: 20
        minimum: 1
  dependencies:
    operator:
      name: k8s-operator
      vendor: asag
      version: 0.4.0
  includes:
    - name: defaults-service
      vendor: asag
      version: 0.7.1
  name: k8s
  settings:
    - name: environment
      schema:
        default: k8s_prod
  version: 0.4.0
