diff --git a/manifests/00-namespace.yaml b/manifests/00-namespace.yaml new file mode 100644 index 000000000..c5b284fba --- /dev/null +++ b/manifests/00-namespace.yaml @@ -0,0 +1,9 @@ +kind: Namespace +metadata: + creationTimestamp: null + labels: + kubeshark-created-by: kubeshark + kubeshark-managed-by: kubeshark + name: kubeshark +spec: {} +status: {} diff --git a/manifests/01-service-account.yaml b/manifests/01-service-account.yaml new file mode 100644 index 000000000..0e6a11756 --- /dev/null +++ b/manifests/01-service-account.yaml @@ -0,0 +1,8 @@ +kind: ServiceAccount +metadata: + creationTimestamp: null + labels: + kubeshark-cli-version: v1 + kubeshark-created-by: kubeshark + kubeshark-managed-by: kubeshark + name: kubeshark-service-account diff --git a/manifests/02-cluster-role.yaml b/manifests/02-cluster-role.yaml new file mode 100644 index 000000000..22a14b3c7 --- /dev/null +++ b/manifests/02-cluster-role.yaml @@ -0,0 +1,21 @@ +kind: ClusterRole +metadata: + creationTimestamp: null + labels: + kubeshark-cli-version: v1 + kubeshark-created-by: kubeshark + kubeshark-managed-by: kubeshark + name: kubeshark-cluster-role +rules: + - apiGroups: + - "" + - extensions + - apps + resources: + - pods + - services + - endpoints + verbs: + - list + - get + - watch diff --git a/manifests/03-cluster-role-binding.yaml b/manifests/03-cluster-role-binding.yaml new file mode 100644 index 000000000..121c00545 --- /dev/null +++ b/manifests/03-cluster-role-binding.yaml @@ -0,0 +1,16 @@ +kind: ClusterRoleBinding +metadata: + creationTimestamp: null + labels: + kubeshark-cli-version: v1 + kubeshark-created-by: kubeshark + kubeshark-managed-by: kubeshark + name: kubeshark-service-account +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeshark-cluster-role +subjects: + - kind: ServiceAccount + name: kubeshark-service-account + namespace: kubeshark diff --git a/manifests/04-hub-pod.yaml b/manifests/04-hub-pod.yaml new file mode 100644 index 000000000..9315781b3 --- /dev/null +++ b/manifests/04-hub-pod.yaml @@ -0,0 +1,31 @@ +kind: Pod +metadata: + creationTimestamp: null + labels: + app: kubeshark-hub + kubeshark-created-by: kubeshark + kubeshark-managed-by: kubeshark + name: kubeshark-hub +spec: + containers: + - command: + - ./hub + image: docker.io/kubeshark/hub:latest + imagePullPolicy: Always + name: kubeshark-hub + resources: + limits: + cpu: 750m + memory: 1Gi + requests: + cpu: 50m + memory: 50Mi + dnsPolicy: ClusterFirstWithHostNet + serviceAccountName: kubeshark-service-account + terminationGracePeriodSeconds: 0 + tolerations: + - effect: NoExecute + operator: Exists + - effect: NoSchedule + operator: Exists +status: {} diff --git a/manifests/05-hub-service.yaml b/manifests/05-hub-service.yaml new file mode 100644 index 000000000..84298226d --- /dev/null +++ b/manifests/05-hub-service.yaml @@ -0,0 +1,17 @@ +kind: Service +metadata: + creationTimestamp: null + labels: + kubeshark-created-by: kubeshark + kubeshark-managed-by: kubeshark + name: kubeshark-hub +spec: + ports: + - name: kubeshark-hub + port: 80 + targetPort: 80 + selector: + app: kubeshark-hub + type: ClusterIP +status: + loadBalancer: {} diff --git a/manifests/06-front-pod.yaml b/manifests/06-front-pod.yaml new file mode 100644 index 000000000..86b7421a3 --- /dev/null +++ b/manifests/06-front-pod.yaml @@ -0,0 +1,43 @@ +kind: Pod +metadata: + creationTimestamp: null + labels: + app: kubeshark-front + kubeshark-created-by: kubeshark + kubeshark-managed-by: kubeshark + name: kubeshark-front +spec: + containers: + - env: + - name: REACT_APP_DEFAULT_FILTER + value: ' ' + - name: REACT_APP_HUB_HOST + value: ' ' + - name: REACT_APP_HUB_PORT + value: "8898" + image: docker.io/kubeshark/front:latest + imagePullPolicy: Always + name: kubeshark-front + readinessProbe: + failureThreshold: 3 + periodSeconds: 1 + successThreshold: 1 + tcpSocket: + port: 80 + timeoutSeconds: 1 + resources: + limits: + cpu: 750m + memory: 1Gi + requests: + cpu: 50m + memory: 50Mi + dnsPolicy: ClusterFirstWithHostNet + serviceAccountName: kubeshark-service-account + terminationGracePeriodSeconds: 0 + tolerations: + - effect: NoExecute + operator: Exists + - effect: NoSchedule + operator: Exists +status: {} diff --git a/manifests/07-front-service.yaml b/manifests/07-front-service.yaml new file mode 100644 index 000000000..6ad9451b2 --- /dev/null +++ b/manifests/07-front-service.yaml @@ -0,0 +1,17 @@ +kind: Service +metadata: + creationTimestamp: null + labels: + kubeshark-created-by: kubeshark + kubeshark-managed-by: kubeshark + name: kubeshark-front +spec: + ports: + - name: kubeshark-front + port: 80 + targetPort: 80 + selector: + app: kubeshark-front + type: ClusterIP +status: + loadBalancer: {} diff --git a/manifests/08-worker-daemon-set.yaml b/manifests/08-worker-daemon-set.yaml new file mode 100644 index 000000000..49677a912 --- /dev/null +++ b/manifests/08-worker-daemon-set.yaml @@ -0,0 +1,75 @@ +kind: DaemonSet +metadata: + creationTimestamp: null +spec: + selector: + matchLabels: + app: kubeshark-worker + kubeshark-created-by: kubeshark + kubeshark-managed-by: kubeshark + template: + kind: Pod + metadata: + creationTimestamp: null + labels: + app: kubeshark-worker + kubeshark-created-by: kubeshark + kubeshark-managed-by: kubeshark + name: kubeshark-worker + spec: + containers: + - command: + - ./worker + - -i + - any + - -port + - "8897" + - -servicemesh + - -tls + - -procfs + - /hostproc + image: kubeshark-worker-daemon-set + imagePullPolicy: Always + name: kubeshark-worker + resources: + limits: + cpu: 750m + memory: 1Gi + requests: + cpu: 50m + memory: 50Mi + securityContext: + capabilities: + add: + - NET_RAW + - NET_ADMIN + - SYS_ADMIN + - SYS_PTRACE + - DAC_OVERRIDE + - SYS_RESOURCE + drop: + - ALL + volumeMounts: + - mountPath: /hostproc + name: proc + readOnly: true + - mountPath: /sys + name: sys + readOnly: true + dnsPolicy: ClusterFirstWithHostNet + hostNetwork: true + serviceAccountName: kubeshark-service-account + terminationGracePeriodSeconds: 0 + tolerations: + - effect: NoExecute + operator: Exists + - effect: NoSchedule + operator: Exists + volumes: + - hostPath: + path: /proc + name: proc + - hostPath: + path: /sys + name: sys + status: {}