name: RBAC for ElasticSearch
services:
  zk:
    name: zk
    type: StatefulSet
    apiVersion: apps/v1
    namespace: default
    model: kubernetes
    settings:
      spec:
        pod Management Policy: OrderedReady
        replicas: 3
        selector:
          match Labels:
            app: zk
        service Name: zk-hs
        template:
          metadata:
            labels:
              app: zk
          spec:
            affinity:
              pod Anti Affinity:
                required During Scheduling Ignored During Execution:
                - label Selector:
                    match Expressions:
                    - key: app
                      operator: In
                      values:
                      - zk
                  topology Key: kubernetes.io/hostname
            containers:
            - command:
              - sh
              - -c
              - start-zookeeper --servers=3 --data_dir=/var/lib/zookeeper/data --data_log_dir=/var/lib/zookeeper/data/log
                --conf_dir=/opt/zookeeper/conf --client_port=2181 --election_port=3888
                --server_port=2888 --tick_time=2000 --init_limit=10 --sync_limit=5
                --heap=512M --max_client_cnxns=60 --snap_retain_count=3 --purge_interval=12
                --max_session_timeout=40000 --min_session_timeout=4000 --log_level=INFO
              image: registry.k8s.io/kubernetes-zookeeper:1.0-3.4.10
              image Pull Policy: Always
              liveness Probe:
                exec:
                  command:
                  - sh
                  - -c
                  - zookeeper-ready 2181
                initial Delay Seconds: 10
                timeout Seconds: 5
              name: kubernetes-zookeeper
              ports:
              - container Port: 2181
                name: client
              - container Port: 2888
                name: server
              - container Port: 3888
                name: leader-election
              readiness Probe:
                exec:
                  command:
                  - sh
                  - -c
                  - zookeeper-ready 2181
                initial Delay Seconds: 10
                timeout Seconds: 5
              resources:
                requests:
                  cpu: "0.5"
                  memory: 1Gi
              volume Mounts:
              - mount Path: /var/lib/zookeeper
                name: datadir
            security Context:
              fs Group: 1000
              run As User: 1000
        update Strategy:
          type: RollingUpdate
        volume Claim Templates:
        - metadata:
            name: datadir
          spec:
            access Modes:
            - ReadWriteOnce
            resources:
              requests:
                storage: 10Gi
    traits:
      meshmap:
        edges: []
        id: 8129ed4a-9927-4b0c-ad95-882929c952b6
        label: zk
        meshmodel-metadata:
          genealogy: ""
          isCustomResource: false
          isNamespaced: true
          logoURL: https://github.com/cncf/artwork/blob/master/projects/kubernetes/icon/white/kubernetes-icon-white.svg
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: circle
          styleOverrides: ""
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/apiservice-color.svg
          svgComplete: ""
          svgWhite: ui/public/static/img/meshmodels/kubernetes/white/apiservice-white.svg
        position:
          posX: 13
          posY: 39
  zk-cs:
    name: zk-cs
    type: Service
    apiVersion: v1
    namespace: default
    model: kubernetes
    settings:
      spec:
        ports:
        - name: client
          port: 2181
        selector:
          app: zk
    traits:
      meshmap:
        edges: []
        id: 226fa52e-e5a0-4239-b909-9b442972bab5
        label: zk-cs
        meshmodel-metadata:
          genealogy: ""
          isCustomResource: false
          isNamespaced: true
          logoURL: https://github.com/cncf/artwork/blob/master/projects/kubernetes/icon/white/kubernetes-icon-white.svg
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: round-triangle
          styleOverrides: '{"height":16,"width":17,"padding":12,"background-fit":"none","background-position-y":4}'
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/apiservice-color.svg
          svgComplete: ""
          svgWhite: ui/public/static/img/meshmodels/kubernetes/white/apiservice-white.svg
        position:
          posX: -28
          posY: -30
  zk-hs:
    name: zk-hs
    type: Service
    apiVersion: v1
    namespace: default
    model: kubernetes
    settings:
      spec:
        cluster IP: None
        ports:
        - name: server
          port: 2888
        - name: leader-election
          port: 3888
        selector:
          app: zk
    traits:
      meshmap:
        edges: []
        id: 974b880f-34e9-439a-8d9a-24db8c1293be
        label: zk-hs
        meshmodel-metadata:
          genealogy: ""
          isCustomResource: false
          isNamespaced: true
          logoURL: https://github.com/cncf/artwork/blob/master/projects/kubernetes/icon/white/kubernetes-icon-white.svg
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: round-triangle
          styleOverrides: '{"height":16,"width":17,"padding":12,"background-fit":"none","background-position-y":4}'
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/apiservice-color.svg
          svgComplete: ""
          svgWhite: ui/public/static/img/meshmodels/kubernetes/white/apiservice-white.svg
        position:
          posX: 28
          posY: -30
  zk-pdb:
    name: zk-pdb
    type: PodDisruptionBudget
    apiVersion: policy/v1
    namespace: default
    model: kubernetes
    settings:
      spec:
        max Unavailable: 1
        selector:
          match Labels:
            app: zk
    traits:
      meshmap:
        edges: []
        id: 3851b428-cc0b-47f2-a0ec-08d4c79b7a0a
        label: zk-pdb
        meshmodel-metadata:
          genealogy: ""
          isCustomResource: false
          isNamespaced: true
          logoURL: https://github.com/cncf/artwork/blob/master/projects/kubernetes/icon/white/kubernetes-icon-white.svg
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: circle
          styleOverrides: ""
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/apiservice-color.svg
          svgComplete: ""
          svgWhite: ui/public/static/img/meshmodels/kubernetes/white/apiservice-white.svg
        position:
          posX: -32.5
          posY: 39
