Skip to content

Commit

Permalink
Merge pull request #334 from pixiake/release-1.0
Browse files Browse the repository at this point in the history
merge controller and apiserver to one pod
  • Loading branch information
liangzai006 authored Aug 20, 2024
2 parents 39c2b99 + ebc4099 commit 820edcc
Show file tree
Hide file tree
Showing 19 changed files with 303 additions and 390 deletions.
Binary file modified bin/controller-gen
Binary file not shown.
Binary file modified bin/kustomize
Binary file not shown.
20 changes: 12 additions & 8 deletions chart/kubeeye/crds/inspectplan-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: (devel)
name: inspectplans.kubeeye.kubesphere.io
spec:
group: kubeeye.kubesphere.io
Expand All @@ -20,14 +19,19 @@ spec:
description: InspectPlan is the Schema for the InspectPlans 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'
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'
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
Expand Down
20 changes: 12 additions & 8 deletions chart/kubeeye/crds/inspectresult-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: (devel)
name: inspectresults.kubeeye.kubesphere.io
spec:
group: kubeeye.kubesphere.io
Expand All @@ -20,14 +19,19 @@ spec:
description: InspectResult is the Schema for the inspectresults 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'
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'
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
Expand Down
20 changes: 12 additions & 8 deletions chart/kubeeye/crds/inspectrule-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: (devel)
name: inspectrules.kubeeye.kubesphere.io
spec:
group: kubeeye.kubesphere.io
Expand All @@ -20,14 +19,19 @@ spec:
description: InspectRule is the Schema for the InspectRule 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'
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'
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
Expand Down
20 changes: 12 additions & 8 deletions chart/kubeeye/crds/inspecttask-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: (devel)
name: inspecttasks.kubeeye.kubesphere.io
spec:
group: kubeeye.kubesphere.io
Expand All @@ -20,14 +19,19 @@ spec:
description: InspectTask is the Schema for the InspectTasks 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'
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'
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
Expand Down
4 changes: 2 additions & 2 deletions chart/kubeeye/templates/apiserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
spec:
type: {{ .Values.apiserver.type }}
selector:
app: kubeeye-apiserver
control-plane: kubeeye-controller-manager
{{- include "kubeeye.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.apiserver.ports | toYaml | nindent 2 -}}
{{- .Values.apiserver.ports | toYaml | nindent 2 }}
2 changes: 1 addition & 1 deletion chart/kubeeye/templates/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: kubeeye-config
name: {{ include "kubeeye.fullname" . }}-config
labels:
{{- include "kubeeye.labels" . | nindent 4 }}
data:
Expand Down
102 changes: 38 additions & 64 deletions chart/kubeeye/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,69 +1,5 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "kubeeye.fullname" . }}-apiserver
labels:
app: kubeeye-apiserver
{{- include "kubeeye.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.apiserver.replicas }}
selector:
matchLabels:
app: kubeeye-apiserver
{{- include "kubeeye.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: kubeeye-apiserver
{{- include "kubeeye.selectorLabels" . | nindent 8 }}
spec:
containers:
- env:
- name: GIN_MODE
value: {{ quote .Values.apiserver.kubeeyeApiserver.env.ginMode }}
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ quote .Values.kubernetesClusterDomain }}
image: {{ .Values.apiserver.kubeeyeApiserver.image.repository }}:{{ .Values.apiserver.kubeeyeApiserver.image.tag
| default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.apiserver.kubeeyeApiserver.imagePullPolicy }}
livenessProbe:
httpGet:
path: /readyz
port: 9090
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 10
name: kubeeye-apiserver
readinessProbe:
httpGet:
path: /healthz
port: 9090
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 10
resources: {{- toYaml .Values.apiserver.kubeeyeApiserver.resources | nindent 10
}}
volumeMounts:
- mountPath: /etc/localtime
name: localtime
- mountPath: /kubeeye/data
name: inspect-result
readOnly: true
restartPolicy: Always
securityContext:
fsGroup: 1000
runAsNonRoot: true
serviceAccountName: {{ include "kubeeye.fullname" . }}-controller-manager
volumes:
- hostPath:
path: /etc/localtime
name: localtime
- name: inspect-result
persistentVolumeClaim:
claimName: {{ include "kubeeye.fullname" . }}-inspect-result
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "kubeeye.fullname" . }}-controller-manager
labels:
Expand Down Expand Up @@ -126,6 +62,44 @@ spec:
name: inspect-result
- mountPath: /etc/localtime
name: localtime
- env:
- name: GIN_MODE
value: {{ quote .Values.controllerManager.kubeeyeApiserver.env.ginMode }}
- name: DISABLE_SYSTEM_COMPONENT
value: {{ quote .Values.controllerManager.kubeeyeApiserver.env.disableSystemComponent
}}
- name: DISABLE_OVERVIEW
value: {{ quote .Values.controllerManager.kubeeyeApiserver.env.disableOverview
}}
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ quote .Values.kubernetesClusterDomain }}
image: {{ .Values.controllerManager.kubeeyeApiserver.image.repository }}:{{ .Values.controllerManager.kubeeyeApiserver.image.tag
| default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.controllerManager.kubeeyeApiserver.imagePullPolicy
}}
livenessProbe:
httpGet:
path: /readyz
port: 9090
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 10
name: kubeeye-apiserver
readinessProbe:
httpGet:
path: /healthz
port: 9090
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 10
resources: {{- toYaml .Values.controllerManager.kubeeyeApiserver.resources | nindent
10 }}
volumeMounts:
- mountPath: /etc/localtime
name: localtime
- mountPath: /kubeeye/data
name: inspect-result
readOnly: true
securityContext:
fsGroup: 1000
runAsNonRoot: true
Expand Down
Loading

0 comments on commit 820edcc

Please sign in to comment.