Skip to content

Instantly share code, notes, and snippets.

@ibuziuk
Last active October 30, 2024 11:08
Show Gist options
  • Save ibuziuk/08a23cf4adab86ca49b9a490028e93d8 to your computer and use it in GitHub Desktop.
Save ibuziuk/08a23cf4adab86ca49b9a490028e93d8 to your computer and use it in GitHub Desktop.
EclipseCon 2024
psql -d postgres
\c food_db
@ibuziuk
Copy link
Author

ibuziuk commented Oct 30, 2024

kind: Template
apiVersion: template.openshift.io/v1
metadata:
  name: che-user-namespace-configurator
  namespace: eclipse-che
  labels:
    app.kubernetes.io/component: workspaces-config
    app.kubernetes.io/part-of: che.eclipse.org
objects:
  - kind: ConfigMap
    apiVersion: v1
    metadata:
      name: user-cm
      labels:
        app.kubernetes.io/part-of: che.eclipse.org
        app.kubernetes.io/component: workspaces-config
      annotations:
        controller.devfile.io/mount-as: subpath
        controller.devfile.io/mount-path: /home/user/
    data:
      test-config-map-file: configmap
  - kind: Secret
    apiVersion: v1
    metadata:
      name: user-secret
      labels:
        app.kubernetes.io/part-of: che.eclipse.org
        app.kubernetes.io/component: workspaces-config
      annotations:
        controller.devfile.io/mount-as: subpath
        controller.devfile.io/mount-path: /home/user/
    stringData:
      test-secret-file: secret
  - apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: user-pvc
      labels:
        app.kubernetes.io/part-of: che.eclipse.org
        app.kubernetes.io/component: workspaces-config
        controller.devfile.io/mount-to-devworkspace: 'true'
      annotations:
        controller.devfile.io/mount-path: /home/user/user-pvc
        controller.devfile.io/read-only: 'false'
    spec:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: 5Gi
      volumeMode: Filesystem
  - apiVersion: v1
    kind: LimitRange
    metadata:
      name: my-limit-range
    spec:
      limits:
        - default:
            cpu: '1'
            memory: 512Mi
          defaultRequest:
            cpu: 500m
            memory: 256Mi
          max:
            cpu: '2'
            memory: 2Gi
          min:
            cpu: 500m
            memory: 256Mi
  - apiVersion: v1
    kind: ResourceQuota
    metadata:
      name: my-resource-quota
    spec:
      hard:
        cpu: '10'
        memory: 10Gi
        pods: '10'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment