github.com/aloknnikhil/operator-sdk@v0.8.2/test/ansible-memcached/tasks.yml (about)

     1  ---
     2  - name: start memcached
     3    k8s:
     4      definition:
     5        kind: Deployment
     6        apiVersion: apps/v1
     7        metadata:
     8          name: '{{ meta.name }}-memcached'
     9          namespace: '{{ meta.namespace }}'
    10          labels:
    11            app: memcached
    12        spec:
    13          replicas: "{{size}}"
    14          selector:
    15            matchLabels:
    16              app: memcached
    17          template:
    18            metadata:
    19              labels:
    20                app: memcached
    21            spec:
    22              containers:
    23              - name: memcached
    24                command:
    25                - memcached
    26                - -m=64
    27                - -o
    28                - modern
    29                - -v
    30                image: "docker.io/memcached:1.4.36-alpine"
    31                ports:
    32                  - containerPort: 11211
    33                readinessProbe:
    34                  tcpSocket:
    35                    port: 11211
    36                  initialDelaySeconds: 3
    37                  periodSeconds: 3
    38  
    39  - k8s_status:
    40      api_version: ansible.example.com/v1alpha1
    41      kind: Memcached
    42      name: "{{ meta.name }}"
    43      namespace: "{{ meta.namespace }}"
    44      status:
    45        test: "hello world"
    46  
    47  - k8s:
    48      definition:
    49        kind: Secret
    50        apiVersion: v1
    51        metadata:
    52          name: test-secret
    53          namespace: "{{ meta.namespace }}"
    54        data:
    55          test: aGVsbG8K