apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  name: ptp-operator.4.9.0-202111151318
  namespace: openshift-ptp
  annotations:
    capabilities: Basic Install
    categories: Networking
    provider: Red Hat
    support: Red Hat
    # This annotation injection is a workaround for BZ-1950047, since the associated
    # annotation in spec.install.spec.deployments.template.metadata is presently ignored.
    # TODO: remove the next line after BZ-1950047 is resolved.
    target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
    operators.openshift.io/infrastructure-features: '["disconnected"]'
    containerImage: image-registry.openshift-image-registry.svc:5000/openshift/ose-ptp-operator:v4.9.0.20211115.131845
    createdAt: 2019-10-14
    certified: "false"
    repository: https://github.com/openshift/ptp-operator
    olm.skipRange: ">=4.3.0-0 <4.9.0-202111151318"
    alm-examples: |-
      [
        {
          "apiVersion": "ptp.openshift.io/v1",
          "kind": "PtpConfig",
          "metadata": {
            "name": "ptpconfig-1",
            "namespace": "openshift-ptp"
          },
          "spec": {
            "profile": [{
                "name": "ptpconfig-profile-1",
                "interface": "eth0",
                "ptp4lOpts": "-s -2",
                "phc2sysOpts": "-a -r"
              }
            ],
            "recommend": [{
                "profile": "ptpconfig-profile-1",
                "priority": 50,
                "match": [{
                    "nodeLabel": "node-role.kubernetes.io/worker=",
                    "nodeName": "kubernetes.io/hostname=node.example.com"
                  }
                ]
              }
            ]
          }
        },
        {
          "apiVersion": "ptp.openshift.io/v1",
          "kind": "NodePtpDevice",
          "metadata": {
            "name": "node.example.com",
            "namespace": "openshift-ptp"
          },
          "spec": {}
        },
        {
          "apiVersion": "ptp.openshift.io/v1",
          "kind": "PtpOperatorConfig",
          "metadata": {
            "name": "default",
            "namespace": "openshift-ptp"
          },
          "spec": {
            "daemonNodeSelector": {}
          }
        }
      ]
    description: This software enables configuration of Precision Time Protocol(PTP) on Kubernetes. It detects hardware capable PTP devices on each node, and configures linuxptp processes such as ptp4l, phc2sys and timemaster.
spec:
  maintainers:
  - name: "Red Hat"
    email: support@redhat.com
  links:
  - name: Documentation operator
    url: https://github.com/openshift/ptp-operator
  - name: Documentation operand
    url: https://github.com/openshift/linuxptp-daemon
  keywords: ["ptp"]
  apiservicedefinitions: {}
  customresourcedefinitions:
    owned:
    - kind: PtpConfig
      version: v1
      name: ptpconfigs.ptp.openshift.io
      displayName: PTP Configuration
      description: |
        Represents PTP Configuration that will be applied to linuxptp process based on node name or label
    - kind: PtpOperatorConfig
      version: v1
      name: ptpoperatorconfigs.ptp.openshift.io
      displayName: Operator Configuration
      description: |
        Represents Configuration for Operator itself
    - kind: NodePtpDevice
      version: v1
      name: nodeptpdevices.ptp.openshift.io
      displayName: Node PTP Devices
      description: |
        Represents PTP capable devices on node
  description: |
      # Precision Time Protocol (PTP) Operator for Openshift

      ## Introdution
      PTP Operator manages cluster wide PTP configuration.
      This operator has to run in namespace 'openshift-ptp'. An Operator Group is also required to install this operator:
      ```
      $ oc create -f - <<EOF
      apiVersion: v1
      kind: Namespace
      metadata:
        name: openshift-ptp
        annotations:
          workload.openshift.io/allowed: "management"
        labels:
          name: openshift-ptp
          openshift.io/cluster-monitoring: "true"
      EOF

      $ oc create -f - <<EOF
      apiVersion: operators.coreos.com/v1
      kind: OperatorGroup
      metadata:
        name: ptp-operators
        namespace: openshift-ptp
      spec:
        targetNamespaces:
        - openshift-ptp
      EOF
      ```
  displayName: PTP Operator
  install:
    spec:
      clusterPermissions:
      - rules:
        - apiGroups:
          - ""
          resources:
          - nodes
          - pods
          - configmaps
          - namespaces
          - services
          - serviceaccounts
          verbs:
          - '*'
        - apiGroups:
          - apps
          resources:
          - daemonsets
          - replicasets
          - deployments
          verbs:
          - '*'
        - apiGroups:
          - ptp.openshift.io
          resources:
          - '*'
          verbs:
          - '*'
        - apiGroups:
          - monitoring.coreos.com
          resources:
          - servicemonitors
          - prometheusrules
          verbs:
          - '*'
        - apiGroups:
          - rbac.authorization.k8s.io
          resources:
          - roles
          - rolebindings
          verbs:
          - '*'
        serviceAccountName: ptp-operator
      - rules:
        - apiGroups:
          - "ptp.openshift.io"
          resources:
          - '*'
          verbs:
          - '*'
        - apiGroups:
          - "authentication.k8s.io"
          resources:
          - "tokenreviews"
          verbs:
          - "create"
        - apiGroups:
          - "authorization.k8s.io"
          resources:
          - "subjectaccessreviews"
          verbs:
          - "create"
        serviceAccountName: linuxptp-daemon
      permissions:
        - serviceAccountName: ptp-operator
          rules:
            - apiGroups:
              - coordination.k8s.io
              resources:
              - leases
              verbs:
              - get
              - list
              - watch
              - create
              - update
              - patch
              - delete
            - apiGroups:
              - ""
              resources:
              - events
              verbs:
              - create
              - patch
            - apiGroups:
              - ""
              resources:
              - configmaps
              verbs:
              - get
              - list
              - watch
              - create
              - update
              - patch
              - delete
        - serviceAccountName: linuxptp-daemon
          rules:
            - apiGroups:
              - security.openshift.io
              resources:
              - securitycontextconstraints
              verbs:
              - use
              resourceNames:
              - privileged
      deployments:
      - name: ptp-operator
        spec:
          replicas: 1
          selector:
            matchLabels:
              name: ptp-operator
          template:
            metadata:
              annotations:
                target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
              labels:
                name: ptp-operator
            spec:
              serviceAccountName: ptp-operator
              nodeSelector:
                node-role.kubernetes.io/master: ""
              tolerations:
              - effect: NoSchedule
                key: node-role.kubernetes.io/master
                operator: Exists
              containers:
              - name: ptp-operator
                image: image-registry.openshift-image-registry.svc:5000/openshift/ose-ptp-operator:v4.9.0.20211115.131845
                imagePullPolicy: Always
                resources:
                  requests:
                    cpu: 50m
                    memory: 100Mi
                args:
                - --enable-leader-election
                command:
                - ptp-operator
                env:
                - name: WATCH_NAMESPACE
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.namespace
                - name: POD_NAME
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.name
                - name: OPERATOR_NAME
                  value: ptp-operator
                - name: LINUXPTP_DAEMON_IMAGE
                  value: image-registry.openshift-image-registry.svc:5000/openshift/ose-ptp:v4.9.0.20211115.131845
                - name: KUBE_RBAC_PROXY_IMAGE
                  value: image-registry.openshift-image-registry.svc:5000/openshift/ose-kube-rbac-proxy:v4.9.0.20211115.131845
                - name: SIDECAR_EVENT_IMAGE
                  value: image-registry.openshift-image-registry.svc:5000/openshift/ose-cloud-event-proxy:v4.9.0.20211115.131845
    strategy: deployment
  installModes:
  - supported: true
    type: OwnNamespace
  - supported: true
    type: SingleNamespace
  - supported: false
    type: MultiNamespace
  - supported: false
    type: AllNamespaces
  maturity: alpha
  provider:
    name: "Red Hat"
  version: 4.9.0-202111151318
  icon:
  - base64data: [encoded data, 14140 characters]
    mediatype: image/png
