apiVersion: v1
kind: Namespace
metadata:
  annotations:
    openshift.io/node-selector: ""
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: ibm-spectrum-scale
---
apiVersion: v1
imagePullSecrets:
- name: ibm-spectrum-scale-registrykey
kind: ServiceAccount
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: ibm-spectrum-scale-core
  namespace: ibm-spectrum-scale
---
apiVersion: v1
imagePullSecrets:
- name: ibm-spectrum-scale-registrykey
kind: ServiceAccount
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: ibm-spectrum-scale-default
  namespace: ibm-spectrum-scale
---
apiVersion: v1
imagePullSecrets:
- name: ibm-spectrum-scale-registrykey
kind: ServiceAccount
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: ibm-spectrum-scale-gui
  namespace: ibm-spectrum-scale
---
apiVersion: v1
imagePullSecrets:
- name: ibm-spectrum-scale-registrykey
kind: ServiceAccount
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: ibm-spectrum-scale-pmcollector
  namespace: ibm-spectrum-scale
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: ibm-spectrum-scale-sysmon
  namespace: ibm-spectrum-scale
rules:
- apiGroups:
  - ""
  resources:
  - pods
  - services
  verbs:
  - get
  - list
- apiGroups:
  - apps
  resources:
  - deployments
  - statefulsets
  verbs:
  - get
  - list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: ibm-spectrum-scale-privileged
  namespace: ibm-spectrum-scale
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: ibm-spectrum-scale-privileged
subjects:
- kind: ServiceAccount
  name: ibm-spectrum-scale-pmcollector
  namespace: ibm-spectrum-scale
- kind: ServiceAccount
  name: ibm-spectrum-scale-gui
  namespace: ibm-spectrum-scale
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: ibm-spectrum-scale-sysmon
  namespace: ibm-spectrum-scale
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: ibm-spectrum-scale-sysmon
subjects:
- kind: ServiceAccount
  name: ibm-spectrum-scale-core
  namespace: ibm-spectrum-scale
---
apiVersion: scale.spectrum.ibm.com/v1beta1
kind: Cluster
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: ibm-spectrum-scale
  namespace: ibm-spectrum-scale
spec:
  daemon:
    # -------------------------------------------------------------------------------
    # hostAliases is optional
    # -------------------------------------------------------------------------------
    # hostAliases is used in an environment where DNS cannot resolve the remote (storage) cluster
    # note: changing this field after first deployment will require manual pod deletions.
    # hostAliases:
    #   - hostname: example.com
    #     ip: 10.0.0.1
    clusterProfile:
      controlSetxattrImmutableSELinux: "yes"
      enforceFilesetQuotaOnRoot: "yes"
      ignorePrefetchLUNCount: "yes"
      initPrefetchBuffers: "128"
      maxblocksize: 16M
      prefetchPct: "25"
      prefetchTimeout: "30"
    # -------------------------------------------------------------------------------
    # nodeSelector is a User Configurable field.
    # -------------------------------------------------------------------------------
    # In conjunction with the nodeSelector configuration, the operator also
    # applies node affinity according to supported architectures and OS.
    # More info on node selectors:
    #       https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
    nodeSelector:
      node-role.kubernetes.io/worker: ""
    hostAliases:
    - hostname: scale-node-1.ocp48-6184.ibm.com
      ip: 192.168.101.100
    - hostname: scale-node-2.ocp48-6184.ibm.com
      ip: 192.168.103.5
    # -------------------------------------------------------------------------------
    # roles is required
    # -------------------------------------------------------------------------------
    # roles is used to set the cluster configuration parameters
    #   applied to all nodes
    #   - during initial cluster creation
    #   - and when changing these parameters at later time
    roles:
    - name: client
      resources:
        memory: 4Gi
  # -------------------------------------------------------------------------------
  # grafana bridge is optional
  # -------------------------------------------------------------------------------
  # Uncomment the grafanaBridge field to enable
  # grafanaBridge: {}
  # -------------------------------------------------------------------------------
  # User must accept the Spectrum Scale license to deploy a CNSA cluster.
  # By specifying "accept: true" below, user agrees to the terms and conditions set
  # forth by the IBM Spectrum Scale Container Native Data Access/Data Management license located
  # at https://www14.software.ibm.com/cgi-bin/weblap/lap.pl?l=en&popup=y&li_formnum=L-CPES-C5HT84&title=IBM%20License%20Agreement
  #
  # Enter either data-access or data-management to the license.license field. Customers entitled to
  # the Data Management Edition can use either data-management or data-access. Customers entitled to
  # the Data Access Edition can only use data-access.
  # -------------------------------------------------------------------------------
  license:
    accept: true
    license: data-management
---
apiVersion: scale.spectrum.ibm.com/v1beta1
kind: Filesystem
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: remote-sample
  namespace: ibm-spectrum-scale
spec:
  remote:
    cluster: remotecluster-sample
    fs: gpfs0
---
apiVersion: scale.spectrum.ibm.com/v1beta1
kind: RemoteCluster
metadata:
  labels:
    app.kubernetes.io/instance: ibm-spectrum-scale
    app.kubernetes.io/name: cluster
  name: remotecluster-sample
  namespace: ibm-spectrum-scale
spec:
  # contactNodes are optional and provides a list of nodes from the storage cluster
  # to be used as the remote cluster contact nodes.  The names should be the daemon
  # node names.  If not specified, the operator will use any 3 nodes detected
  # from the storage cluster.
  # contactNodes:
  # - storagecluster1node1
  # - storagecluster1node2
  gui:
    # cacert: cacert-storage-cluster-1
    # This is the secret that contains the CSIAdmin user
    # credentials in the ibm-spectrum-scale-csi namespace.
    csiSecretName: csi-remote-mount-storage-cluster-1
    host: scale-node-1.ocp48-6184.ibm.com
    insecureSkipVerify: true
    # This is the secret that contains the ContainerOperator user
    # credentials in the ibm-spectrum-scale namespace
    secretName: cnsa-remote-mount-storage-cluster-1