Skip to content

Commit 820edcc

Browse files
authored
Merge pull request #334 from pixiake/release-1.0
merge controller and apiserver to one pod
2 parents 39c2b99 + ebc4099 commit 820edcc

19 files changed

+303
-390
lines changed

bin/controller-gen

2.64 MB
Binary file not shown.

bin/kustomize

-4.58 MB
Binary file not shown.

chart/kubeeye/crds/inspectplan-crd.yaml

+12-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.11.1
6-
creationTimestamp: null
5+
controller-gen.kubebuilder.io/version: (devel)
76
name: inspectplans.kubeeye.kubesphere.io
87
spec:
98
group: kubeeye.kubesphere.io
@@ -20,14 +19,19 @@ spec:
2019
description: InspectPlan is the Schema for the InspectPlans API
2120
properties:
2221
apiVersion:
23-
description: 'APIVersion defines the versioned schema of this representation
24-
of an object. Servers should convert recognized schemas to the latest
25-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
22+
description: |-
23+
APIVersion defines the versioned schema of this representation of an object.
24+
Servers should convert recognized schemas to the latest internal value, and
25+
may reject unrecognized values.
26+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2627
type: string
2728
kind:
28-
description: 'Kind is a string value representing the REST resource this
29-
object represents. Servers may infer this from the endpoint the client
30-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
29+
description: |-
30+
Kind is a string value representing the REST resource this object represents.
31+
Servers may infer this from the endpoint the client submits requests to.
32+
Cannot be updated.
33+
In CamelCase.
34+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3135
type: string
3236
metadata:
3337
type: object

chart/kubeeye/crds/inspectresult-crd.yaml

+12-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.11.1
6-
creationTimestamp: null
5+
controller-gen.kubebuilder.io/version: (devel)
76
name: inspectresults.kubeeye.kubesphere.io
87
spec:
98
group: kubeeye.kubesphere.io
@@ -20,14 +19,19 @@ spec:
2019
description: InspectResult is the Schema for the inspectresults API
2120
properties:
2221
apiVersion:
23-
description: 'APIVersion defines the versioned schema of this representation
24-
of an object. Servers should convert recognized schemas to the latest
25-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
22+
description: |-
23+
APIVersion defines the versioned schema of this representation of an object.
24+
Servers should convert recognized schemas to the latest internal value, and
25+
may reject unrecognized values.
26+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2627
type: string
2728
kind:
28-
description: 'Kind is a string value representing the REST resource this
29-
object represents. Servers may infer this from the endpoint the client
30-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
29+
description: |-
30+
Kind is a string value representing the REST resource this object represents.
31+
Servers may infer this from the endpoint the client submits requests to.
32+
Cannot be updated.
33+
In CamelCase.
34+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3135
type: string
3236
metadata:
3337
type: object

chart/kubeeye/crds/inspectrule-crd.yaml

+12-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.11.1
6-
creationTimestamp: null
5+
controller-gen.kubebuilder.io/version: (devel)
76
name: inspectrules.kubeeye.kubesphere.io
87
spec:
98
group: kubeeye.kubesphere.io
@@ -20,14 +19,19 @@ spec:
2019
description: InspectRule is the Schema for the InspectRule API
2120
properties:
2221
apiVersion:
23-
description: 'APIVersion defines the versioned schema of this representation
24-
of an object. Servers should convert recognized schemas to the latest
25-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
22+
description: |-
23+
APIVersion defines the versioned schema of this representation of an object.
24+
Servers should convert recognized schemas to the latest internal value, and
25+
may reject unrecognized values.
26+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2627
type: string
2728
kind:
28-
description: 'Kind is a string value representing the REST resource this
29-
object represents. Servers may infer this from the endpoint the client
30-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
29+
description: |-
30+
Kind is a string value representing the REST resource this object represents.
31+
Servers may infer this from the endpoint the client submits requests to.
32+
Cannot be updated.
33+
In CamelCase.
34+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3135
type: string
3236
metadata:
3337
type: object

chart/kubeeye/crds/inspecttask-crd.yaml

+12-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.11.1
6-
creationTimestamp: null
5+
controller-gen.kubebuilder.io/version: (devel)
76
name: inspecttasks.kubeeye.kubesphere.io
87
spec:
98
group: kubeeye.kubesphere.io
@@ -20,14 +19,19 @@ spec:
2019
description: InspectTask is the Schema for the InspectTasks API
2120
properties:
2221
apiVersion:
23-
description: 'APIVersion defines the versioned schema of this representation
24-
of an object. Servers should convert recognized schemas to the latest
25-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
22+
description: |-
23+
APIVersion defines the versioned schema of this representation of an object.
24+
Servers should convert recognized schemas to the latest internal value, and
25+
may reject unrecognized values.
26+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2627
type: string
2728
kind:
28-
description: 'Kind is a string value representing the REST resource this
29-
object represents. Servers may infer this from the endpoint the client
30-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
29+
description: |-
30+
Kind is a string value representing the REST resource this object represents.
31+
Servers may infer this from the endpoint the client submits requests to.
32+
Cannot be updated.
33+
In CamelCase.
34+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3135
type: string
3236
metadata:
3337
type: object

chart/kubeeye/templates/apiserver.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
spec:
88
type: {{ .Values.apiserver.type }}
99
selector:
10-
app: kubeeye-apiserver
10+
control-plane: kubeeye-controller-manager
1111
{{- include "kubeeye.selectorLabels" . | nindent 4 }}
1212
ports:
13-
{{- .Values.apiserver.ports | toYaml | nindent 2 -}}
13+
{{- .Values.apiserver.ports | toYaml | nindent 2 }}

chart/kubeeye/templates/config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: ConfigMap
33
metadata:
4-
name: kubeeye-config
4+
name: {{ include "kubeeye.fullname" . }}-config
55
labels:
66
{{- include "kubeeye.labels" . | nindent 4 }}
77
data:

chart/kubeeye/templates/deployment.yaml

+38-64
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,5 @@
11
apiVersion: apps/v1
22
kind: Deployment
3-
metadata:
4-
name: {{ include "kubeeye.fullname" . }}-apiserver
5-
labels:
6-
app: kubeeye-apiserver
7-
{{- include "kubeeye.labels" . | nindent 4 }}
8-
spec:
9-
replicas: {{ .Values.apiserver.replicas }}
10-
selector:
11-
matchLabels:
12-
app: kubeeye-apiserver
13-
{{- include "kubeeye.selectorLabels" . | nindent 6 }}
14-
template:
15-
metadata:
16-
labels:
17-
app: kubeeye-apiserver
18-
{{- include "kubeeye.selectorLabels" . | nindent 8 }}
19-
spec:
20-
containers:
21-
- env:
22-
- name: GIN_MODE
23-
value: {{ quote .Values.apiserver.kubeeyeApiserver.env.ginMode }}
24-
- name: KUBERNETES_CLUSTER_DOMAIN
25-
value: {{ quote .Values.kubernetesClusterDomain }}
26-
image: {{ .Values.apiserver.kubeeyeApiserver.image.repository }}:{{ .Values.apiserver.kubeeyeApiserver.image.tag
27-
| default .Chart.AppVersion }}
28-
imagePullPolicy: {{ .Values.apiserver.kubeeyeApiserver.imagePullPolicy }}
29-
livenessProbe:
30-
httpGet:
31-
path: /readyz
32-
port: 9090
33-
initialDelaySeconds: 15
34-
periodSeconds: 20
35-
timeoutSeconds: 10
36-
name: kubeeye-apiserver
37-
readinessProbe:
38-
httpGet:
39-
path: /healthz
40-
port: 9090
41-
initialDelaySeconds: 5
42-
periodSeconds: 10
43-
timeoutSeconds: 10
44-
resources: {{- toYaml .Values.apiserver.kubeeyeApiserver.resources | nindent 10
45-
}}
46-
volumeMounts:
47-
- mountPath: /etc/localtime
48-
name: localtime
49-
- mountPath: /kubeeye/data
50-
name: inspect-result
51-
readOnly: true
52-
restartPolicy: Always
53-
securityContext:
54-
fsGroup: 1000
55-
runAsNonRoot: true
56-
serviceAccountName: {{ include "kubeeye.fullname" . }}-controller-manager
57-
volumes:
58-
- hostPath:
59-
path: /etc/localtime
60-
name: localtime
61-
- name: inspect-result
62-
persistentVolumeClaim:
63-
claimName: {{ include "kubeeye.fullname" . }}-inspect-result
64-
---
65-
apiVersion: apps/v1
66-
kind: Deployment
673
metadata:
684
name: {{ include "kubeeye.fullname" . }}-controller-manager
695
labels:
@@ -126,6 +62,44 @@ spec:
12662
name: inspect-result
12763
- mountPath: /etc/localtime
12864
name: localtime
65+
- env:
66+
- name: GIN_MODE
67+
value: {{ quote .Values.controllerManager.kubeeyeApiserver.env.ginMode }}
68+
- name: DISABLE_SYSTEM_COMPONENT
69+
value: {{ quote .Values.controllerManager.kubeeyeApiserver.env.disableSystemComponent
70+
}}
71+
- name: DISABLE_OVERVIEW
72+
value: {{ quote .Values.controllerManager.kubeeyeApiserver.env.disableOverview
73+
}}
74+
- name: KUBERNETES_CLUSTER_DOMAIN
75+
value: {{ quote .Values.kubernetesClusterDomain }}
76+
image: {{ .Values.controllerManager.kubeeyeApiserver.image.repository }}:{{ .Values.controllerManager.kubeeyeApiserver.image.tag
77+
| default .Chart.AppVersion }}
78+
imagePullPolicy: {{ .Values.controllerManager.kubeeyeApiserver.imagePullPolicy
79+
}}
80+
livenessProbe:
81+
httpGet:
82+
path: /readyz
83+
port: 9090
84+
initialDelaySeconds: 15
85+
periodSeconds: 20
86+
timeoutSeconds: 10
87+
name: kubeeye-apiserver
88+
readinessProbe:
89+
httpGet:
90+
path: /healthz
91+
port: 9090
92+
initialDelaySeconds: 5
93+
periodSeconds: 10
94+
timeoutSeconds: 10
95+
resources: {{- toYaml .Values.controllerManager.kubeeyeApiserver.resources | nindent
96+
10 }}
97+
volumeMounts:
98+
- mountPath: /etc/localtime
99+
name: localtime
100+
- mountPath: /kubeeye/data
101+
name: inspect-result
102+
readOnly: true
129103
securityContext:
130104
fsGroup: 1000
131105
runAsNonRoot: true

0 commit comments

Comments
 (0)