apiVersion: service.aep.asag.io/v1
kind: Definition
metadata:
  namespace: asag
  name: k8s-0.0.0-bfe37a37
spec:
  name: k8s
  version: 0.0.0-bfe37a37
  includes:
    - vendor: asag
      name: defaults-service
      version: 0.2.3
  clusters:
    - name: etcd
      flags:
        - key: v1_role
          from: value
          value: etcd
          to: label
        - key: delay_final_config
          from: value
          value: true
          to: annotation
      sizing:
        initial: 3
        minimum: 1
        maximum: 10
        increment: 1
      podspec:
        containers:
          - name: etcd
            image: aep/base_jammy
      provides:
        - name: etcd
          network: direct
          exposed: false
          servicespec:
            ports:
              - name: clients
                protocol: TCP
                port: 2379
                targetPort: 2379
              - name: peers
                protocol: TCP
                port: 2380
                targetPort: 2380
    - name: k8s-api
      flags:
        - key: v1_role
          from: value
          value: k8s-api
          to: label
        - key: v1_service_cluster_ip_range
          from: setting
          setting: service_cluster_ip_range
          to: annotation
        - key: delay_final_config
          from: value
          value: true
          to: annotation
      settings:
        - name: service_cluster_ip_range
          from:
            - user
            - event
          required: true
          schema:
            type: string
            description: Virtual IP address range for services created on Kubernetes
              (CIDR notation)
      sizing:
        initial: 2
        minimum: 1
        maximum: 10
        increment: 1
      podspec:
        containers:
          - name: k8s-api
            image: aep/base_jammy
      provides:
        - name: k8s-api-ha
          network: loadbalanced
          exposed: true
          servicespec:
            ports:
              - name: api
                protocol: TCP
                port: 6443
                targetPort: 6443
    - name: k8s-minion
      flags:
        - key: v1_role
          from: value
          value: k8s-minion
          to: label
        - key: gateway_ip
          from: setting
          setting: gateway_ip
          to: annotation
        - key: delay_final_config
          from: value
          value: true
          to: annotation
      annotations:
        x-lxe-additional-lxd-config: 'raw.lxc: lxc.mount.entry = /dev/fuse dev/fuse
          none bind,create=file 0 0

          '
      settings:
        - name: gateway_ip
          from:
            - user
          required: true
          schema:
            type: string
            description: Virtual IP address that serves as the nexthop address for
              routing into Kubernetes networks.
      sizing:
        initial: 3
        minimum: 1
        maximum: 20
        increment: 1
      podspec:
        containers:
          - name: k8s-minion
            image: aep/base_jammy
            securityContext:
              privileged: true
  dependencies:
    operator:
      name: k8s-operator
      vendor: asag
      version: 0.0.0-bfe37a37
  settings:
    - name: environment
      schema:
        default: k8s_prod
