olm.yaml 9.0 KB
Newer Older
N
Natale Vinto 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
---
apiVersion: v1
kind: Namespace
metadata:
  name: olm
---
apiVersion: v1
kind: Namespace
metadata:
  name: operators
---
kind: ServiceAccount
apiVersion: v1
metadata:
  name: olm-operator-serviceaccount
  namespace: olm
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: system:controller:operator-lifecycle-manager
rules:
- apiGroups: ["*"]
  resources: ["*"]
  verbs: ["*"]
- nonResourceURLs: ["*"]
  verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: olm-operator-binding-olm
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: system:controller:operator-lifecycle-manager
subjects:
- kind: ServiceAccount
  name: olm-operator-serviceaccount
  namespace: olm
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: olm-operator
  namespace: olm
  labels:
    app: olm-operator
spec:
  strategy:
    type: RollingUpdate
  replicas: 1
  selector:
    matchLabels:
      app: olm-operator
  template:
    metadata:
      labels:
        app: olm-operator
    spec:
      serviceAccountName: olm-operator-serviceaccount
      containers:
        - name: olm-operator
          command:
          - /bin/olm
          args:
A
awgreene 已提交
67
          - --namespace
N
Natale Vinto 已提交
68
          - $(OPERATOR_NAMESPACE)
A
awgreene 已提交
69
          - --writeStatusName
N
Natale Vinto 已提交
70
          - ""
A
awgreene 已提交
71
          image: quay.io/operator-framework/olm@sha256:2c389d2e380c842cbf542820ad4493249164302ddf0e699b0a37105d234e67ee
N
Natale Vinto 已提交
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
            - containerPort: 8081
              name: metrics
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8080
          terminationMessagePolicy: FallbackToLogsOnError
          env:
        
          - name: OPERATOR_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: OPERATOR_NAME
            value: olm-operator
          resources:
            requests:
              cpu: 10m
              memory: 160Mi
          
      
      nodeSelector:
        beta.kubernetes.io/os: linux
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: catalog-operator
  namespace: olm
  labels:
    app: catalog-operator
spec:
  strategy:
    type: RollingUpdate
  replicas: 1
  selector:
    matchLabels:
      app: catalog-operator
  template:
    metadata:
      labels:
        app: catalog-operator
    spec:
      serviceAccountName: olm-operator-serviceaccount
      containers:
        - name: catalog-operator
          command:
          - /bin/catalog
          args:
          - '-namespace'
          - olm
          - -configmapServerImage=quay.io/operator-framework/configmap-operator-registry:latest
A
awgreene 已提交
132 133 134
          - -util-image
          -  quay.io/operator-framework/olm@sha256:2c389d2e380c842cbf542820ad4493249164302ddf0e699b0a37105d234e67ee
          image: quay.io/operator-framework/olm@sha256:2c389d2e380c842cbf542820ad4493249164302ddf0e699b0a37105d234e67ee
N
Natale Vinto 已提交
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
            - containerPort: 8081
              name: metrics
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8080
          terminationMessagePolicy: FallbackToLogsOnError
          env:
          
          resources:
            requests:
              cpu: 10m
              memory: 80Mi
          
      
      nodeSelector:
        beta.kubernetes.io/os: linux
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: aggregate-olm-edit
  labels:
    rbac.authorization.k8s.io/aggregate-to-admin: "true"
    rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["operators.coreos.com"]
  resources: ["subscriptions"]
  verbs: ["create", "update", "patch", "delete"]
- apiGroups: ["operators.coreos.com"]
  resources: ["clusterserviceversions", "catalogsources", "installplans", "subscriptions"]
  verbs: ["delete"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: aggregate-olm-view
  labels:
    rbac.authorization.k8s.io/aggregate-to-admin: "true"
    rbac.authorization.k8s.io/aggregate-to-edit: "true"
    rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups: ["operators.coreos.com"]
  resources: ["clusterserviceversions", "catalogsources", "installplans", "subscriptions", "operatorgroups"]
  verbs: ["get", "list", "watch"]
- apiGroups: ["packages.operators.coreos.com"]
  resources: ["packagemanifests", "packagemanifests/icon"]
  verbs: ["get", "list", "watch"]
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: global-operators
  namespace: operators
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: olm-operators
  namespace: olm
spec:
  targetNamespaces:
    - olm
---
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  name: packageserver
  namespace: olm
  labels:
A
awgreene 已提交
213
    olm.version: 0.15.1
N
Natale Vinto 已提交
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
spec:
  displayName: Package Server
  description: Represents an Operator package that is available from a given CatalogSource which will resolve to a ClusterServiceVersion.
  minKubeVersion: 1.11.0
  keywords: ['packagemanifests', 'olm', 'packages']
  maintainers:
  - name: Red Hat
    email: openshift-operators@redhat.com
  provider:
    name: Red Hat
  links:
  - name: Package Server
    url: https://github.com/operator-framework/operator-lifecycle-manager/tree/master/pkg/package-server
  installModes:
  - type: OwnNamespace
    supported: true
  - type: SingleNamespace
    supported: true
  - type: MultiNamespace
    supported: true
  - type: AllNamespaces
    supported: true
  install:
    strategy: deployment
    spec:
      clusterPermissions:
      - serviceAccountName: olm-operator-serviceaccount
        rules:
        - apiGroups:
            - authorization.k8s.io
          resources:
            - subjectaccessreviews
          verbs:
            - create
            - get
        - apiGroups:
          - ""
          resources:
          - configmaps
          verbs:
          - get
          - list
          - watch
        - apiGroups:
          - "operators.coreos.com"
          resources:
          - catalogsources
          verbs:
          - get
          - list
          - watch
        - apiGroups:
          - "packages.operators.coreos.com"
          resources:
          - packagemanifests
          verbs:
          - get
          - list
      deployments:
      - name: packageserver
        spec:
          strategy:
            type: RollingUpdate
          replicas: 2
          selector:
            matchLabels:
              app: packageserver
          template:
            metadata:
              labels:
                app: packageserver
            spec:
              serviceAccountName: olm-operator-serviceaccount
              nodeSelector:
                beta.kubernetes.io/os: linux
              containers:
              - name: packageserver
                command:
                - /bin/package-server
                - -v=4
                - --secure-port
                - "5443"
                - --global-namespace
                - olm
A
awgreene 已提交
298
                image: quay.io/operator-framework/olm@sha256:2c389d2e380c842cbf542820ad4493249164302ddf0e699b0a37105d234e67ee
N
Natale Vinto 已提交
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
                imagePullPolicy: Always
                ports:
                - containerPort: 5443
                livenessProbe:
                  httpGet:
                    scheme: HTTPS
                    path: /healthz
                    port: 5443
                readinessProbe:
                  httpGet:
                    scheme: HTTPS
                    path: /healthz
                    port: 5443
                terminationMessagePolicy: FallbackToLogsOnError
                resources:
                  requests:
                    cpu: 10m
                    memory: 50Mi
A
awgreene 已提交
317 318 319 320 321 322 323 324
                securityContext:
                  runAsUser: 1000
                volumeMounts:
                - name: tmpfs
                  mountPath: /tmp
              volumes:
              - name: tmpfs
                emptyDir: {}
N
Natale Vinto 已提交
325
  maturity: alpha
A
awgreene 已提交
326
  version: 0.15.1
N
Natale Vinto 已提交
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
  apiservicedefinitions:
    owned:
    - group: packages.operators.coreos.com
      version: v1
      kind: PackageManifest
      name: packagemanifests
      displayName: PackageManifest
      description: A PackageManifest is a resource generated from existing CatalogSources and their ConfigMaps
      deploymentName: packageserver
      containerPort: 5443
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: operatorhubio-catalog
  namespace: olm
spec:
  sourceType: grpc
  image: quay.io/operator-framework/upstream-community-operators:latest
  displayName: Community Operators
  publisher: OperatorHub.io