apiVersion: v1 kind: Namespace metadata: labels: control-plane: controller-manager name: kubeeye-system --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: clusterinsights.kubeeye.kubesphere.io spec: group: kubeeye.kubesphere.io names: kind: ClusterInsight listKind: ClusterInsightList plural: clusterinsights singular: clusterinsight scope: Cluster versions: - name: v1alpha1 schema: openAPIV3Schema: description: ClusterInsight is the Schema for the clusterinsights API properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: description: ClusterInsightSpec defines the desired state of ClusterInsight properties: auditPeriod: type: string required: - auditPeriod type: object status: description: ClusterInsightStatus defines the observed state of ClusterInsight properties: auditPercent: type: integer phase: type: string auditResults: items: properties: namespace: type: string resultInfos: items: properties: resourceInfos: properties: items: items: properties: level: type: string message: type: string reason: type: string type: object type: array name: type: string type: object resourceType: type: string type: object type: array type: object type: array clusterInfo: properties: namespacesCount: type: integer namespacesList: items: type: string type: array nodesCount: type: integer version: type: string workloadsCount: type: integer type: object lastScheduleTime: description: 'INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Important: Run "make" to regenerate code after modifying this file' format: date-time type: string pluginsResults: items: properties: pluginName: type: string ready: type: boolean result: type: object x-kubernetes-preserve-unknown-fields: true type: object type: array scoreInfo: properties: dangerous: type: integer ignore: type: integer passing: type: integer score: type: integer total: type: integer warning: type: integer type: object type: object type: object served: true storage: true subresources: status: {} status: acceptedNames: kind: "" plural: "" conditions: [] storedVersions: [] --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: pluginsubscriptions.kubeeyeplugins.kubesphere.io spec: group: kubeeyeplugins.kubesphere.io names: kind: PluginSubscription listKind: PluginSubscriptionList plural: pluginsubscriptions singular: pluginsubscription scope: Cluster versions: - name: v1alpha1 schema: openAPIV3Schema: description: PluginSubscription is the Schema for the pluginsubscriptions API properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: description: PluginSubscriptionSpec defines the desired state of PluginSubscription properties: enabled: description: Foo is an example field of PluginSubscription. Edit pluginsubscription_types.go to remove/update type: boolean type: object status: description: PluginSubscriptionStatus defines the observed state of PluginSubscription properties: state: description: 'INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Important: Run "make" to regenerate code after modifying this file' type: string type: object type: object served: true storage: true subresources: status: {} status: acceptedNames: kind: "" plural: "" conditions: [] storedVersions: [] --- apiVersion: v1 kind: ServiceAccount metadata: name: kubeeye-controller-manager namespace: kubeeye-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: kubeeye-leader-election-role namespace: kubeeye-system rules: - apiGroups: - "" resources: - configmaps verbs: - get - list - watch - create - update - patch - delete - apiGroups: - coordination.k8s.io resources: - leases verbs: - get - list - watch - create - update - patch - delete - apiGroups: - "" resources: - events verbs: - create - patch --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: creationTimestamp: null name: kubeeye-manager-role rules: - apiGroups: - "" resources: - configmaps - deployments - namespaces - services verbs: - create - delete - get - list - patch - update - watch - apiGroups: - "" resources: - events - namespaces - nodes verbs: - get - list - apiGroups: - "" resources: - serviceaccounts verbs: - create - delete - get - list - patch - update - watch - apiGroups: - apps resources: - '*' verbs: - create - delete - get - list - patch - update - watch - apiGroups: - batch resources: - '*' verbs: - get - list - apiGroups: - "" resources: - '*' verbs: - create - delete - get - list - patch - update - watch - apiGroups: - events.k8s.io resources: - events verbs: - '*' - apiGroups: - kubeeye.kubesphere.io resources: - clusterinsights verbs: - create - delete - get - list - patch - update - watch - apiGroups: - kubeeye.kubesphere.io resources: - clusterinsights/finalizers verbs: - update - apiGroups: - kubeeye.kubesphere.io resources: - clusterinsights/status verbs: - get - patch - update - apiGroups: - kubeeye.kubesphere.io resources: - kubeeyecronjobs verbs: - create - delete - get - list - patch - update - watch - apiGroups: - kubeeye.kubesphere.io resources: - kubeeyecronjobs/finalizers verbs: - update - apiGroups: - kubeeye.kubesphere.io resources: - kubeeyecronjobs/status verbs: - get - patch - update - apiGroups: - kubeeyeplugins.kubesphere.io resources: - pluginsubscriptions verbs: - create - delete - get - list - patch - update - watch - apiGroups: - kubeeyeplugins.kubesphere.io resources: - pluginsubscriptions/finalizers verbs: - update - apiGroups: - kubeeyeplugins.kubesphere.io resources: - pluginsubscriptions/status verbs: - get - patch - update - apiGroups: - rbac.authorization.k8s.io resources: - '*' verbs: - '*' --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: kubeeye-metrics-reader rules: - nonResourceURLs: - /metrics verbs: - get --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: kubeeye-proxy-role rules: - apiGroups: - authentication.k8s.io resources: - tokenreviews verbs: - create - apiGroups: - authorization.k8s.io resources: - subjectaccessreviews verbs: - create --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: kubeeye-leader-election-rolebinding namespace: kubeeye-system roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: kubeeye-leader-election-role subjects: - kind: ServiceAccount name: kubeeye-controller-manager namespace: kubeeye-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: kubeeye-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: kubeeye-manager-role subjects: - kind: ServiceAccount name: kubeeye-controller-manager namespace: kubeeye-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: kubeeye-proxy-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: kubeeye-proxy-role subjects: - kind: ServiceAccount name: kubeeye-controller-manager namespace: kubeeye-system --- apiVersion: v1 data: controller_manager_config.yaml: | apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 kind: ControllerManagerConfig health: healthProbeBindAddress: :8081 metrics: bindAddress: 127.0.0.1:8080 webhook: port: 9443 leaderElection: leaderElect: true resourceName: fa68b2a3.kubesphere.io kind: ConfigMap metadata: name: kubeeye-manager-config namespace: kubeeye-system --- apiVersion: v1 kind: Service metadata: labels: control-plane: controller-manager name: kubeeye-controller-manager-metrics-service namespace: kubeeye-system spec: ports: - name: https port: 8443 protocol: TCP targetPort: https selector: control-plane: controller-manager --- apiVersion: v1 kind: Service metadata: labels: control-plane: controller-manager name: kubeeye-controller-manager-service namespace: kubeeye-system spec: ports: - name: plugins port: 80 protocol: TCP targetPort: 8888 selector: control-plane: controller-manager --- apiVersion: apps/v1 kind: Deployment metadata: labels: control-plane: controller-manager name: kubeeye-controller-manager namespace: kubeeye-system spec: replicas: 1 selector: matchLabels: control-plane: controller-manager template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: control-plane: controller-manager spec: containers: - args: - --secure-listen-address=0.0.0.0:8443 - --upstream=http://127.0.0.1:8080/ - --logtostderr=true - --v=0 image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 name: kube-rbac-proxy ports: - containerPort: 8443 name: https protocol: TCP resources: limits: cpu: 500m memory: 128Mi requests: cpu: 5m memory: 64Mi - args: - --health-probe-bind-address=:8081 - --metrics-bind-address=127.0.0.1:8080 - --zap-encoder=console - --leader-elect command: - /ke-manager image: kubesphere/kubeeye:latest livenessProbe: httpGet: path: /healthz port: 8081 initialDelaySeconds: 15 periodSeconds: 20 name: manager readinessProbe: httpGet: path: /readyz port: 8081 initialDelaySeconds: 5 periodSeconds: 10 resources: limits: cpu: 1500m memory: 2048Mi requests: cpu: 200m memory: 256Mi securityContext: allowPrivilegeEscalation: false securityContext: runAsNonRoot: true serviceAccountName: kubeeye-controller-manager terminationGracePeriodSeconds: 10