github.skymusic.top/operator-framework/operator-sdk@v0.8.2/test/test-framework/deploy/namespace-init.yaml (about)

     1  apiVersion: v1
     2  kind: ServiceAccount
     3  metadata:
     4    name: memcached-operator
     5  
     6  ---
     7  
     8  apiVersion: rbac.authorization.k8s.io/v1
     9  kind: Role
    10  metadata:
    11    name: memcached-operator
    12  rules:
    13  - apiGroups:
    14    - ""
    15    resources:
    16    - pods
    17    - services
    18    - endpoints
    19    - persistentvolumeclaims
    20    - events
    21    - configmaps
    22    - secrets
    23    verbs:
    24    - '*'
    25  - apiGroups:
    26    - apps
    27    resources:
    28    - deployments
    29    - daemonsets
    30    - replicasets
    31    - statefulsets
    32    verbs:
    33    - '*'
    34  - apiGroups:
    35    - cache.example.com
    36    resources:
    37    - '*'
    38    verbs:
    39    - '*'
    40  - apiGroups:
    41    - apps
    42    resources:
    43    - deployments/finalizers
    44    resourceNames:
    45    - memcached-operator
    46    verbs:
    47    - "update"
    48  
    49  ---
    50  
    51  kind: RoleBinding
    52  apiVersion: rbac.authorization.k8s.io/v1
    53  metadata:
    54    name: memcached-operator
    55  subjects:
    56  - kind: ServiceAccount
    57    name: memcached-operator
    58  roleRef:
    59    kind: Role
    60    name: memcached-operator
    61    apiGroup: rbac.authorization.k8s.io
    62  
    63  ---
    64  
    65  apiVersion: apps/v1
    66  kind: Deployment
    67  metadata:
    68    name: memcached-operator
    69  spec:
    70    replicas: 1
    71    selector:
    72      matchLabels:
    73        name: memcached-operator
    74    strategy: {}
    75    template:
    76      metadata:
    77        labels:
    78          name: memcached-operator
    79      spec:
    80        containers:
    81        - command:
    82          - memcached-operator
    83          env:
    84          - name: WATCH_NAMESPACE
    85            valueFrom:
    86              fieldRef:
    87                fieldPath: metadata.namespace
    88          - name: OPERATOR_NAME
    89            value: memcached-operator
    90          image: quay.io/coreos/operator-sdk-dev:test-framework-operator-runtime
    91          imagePullPolicy: Always
    92          name: memcached-operator
    93          resources: {}
    94        serviceAccountName: memcached-operator
    95  status: {}