Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update operator chart and doc format #328

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,19 @@ nebula-storaged-2 1/1 Running 0 19s
```

## Guidelines

[Custom config](doc/user/custom_config.md)

[Log guide](doc/user/log_guide.md)

[Storage guide](doc/user/storage_guide.md)

[SSL guide](doc/user/ssl_guide.md)

[ngctl guide](doc/user/ngctl_guide.md)

[PersistentVolume reclaim guide](doc/user/pv_reclaim.md)
- [Graphd HPA](doc/user/nebula_autoscaler.md)
- [Admission webhook](doc/user/webhook.md)
- [Custom flags](doc/user/custom_config.md)
- [Custom port](doc/user/nebula_port.md)
- [Log](doc/user/log_guide.md)
- [Storaged](doc/user/storage_guide.md)
- [PV reclaim](doc/user/pv_reclaim.md)
- [PV expansion](doc/user/pv_expansion.md)
- [mTLS](doc/user/ssl_guide.md)
- [Security context](doc/user/security_context.md)
- [ngctl](doc/user/ngctl_guide.md)
- [nebula-console](doc/user/nebula_console.md)
- [nebula-exporter](doc/user/nebula_exporter.md)

## FAQ

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,14 @@ spec:
command:
- /usr/local/bin/controller-manager
args:
{{- if .Values.syncPeriod }}
- --sync-period={{ .Values.syncPeriod }}
{{- end }}
{{- if .Values.concurrentNebulaClusterSyncs }}
- --concurrent-nebulacluster-syncs={{ .Values.concurrentNebulaClusterSyncs }}
{{- end }}
{{- if .Values.concurrentNebulaRestoreSyncs }}
- --concurrent-nebularestore-syncs={{ .Values.concurrentNebulaRestoreSyncs }}
{{- end }}
- --leader-elect
- --leader-elect-resource-namespace={{ template "nebula-operator.namespace" . }}
- --enable-admission-webhook={{ .Values.admissionWebhook.create | default false }}
- --enable-admission-webhook={{ .Values.admissionWebhook.create }}
- --webhook-secure-port={{ .Values.admissionWebhook.webhookBindPort }}
- --enable-kruise-scheme={{ .Values.enableKruiseScheme }}
{{- if or .Values.kubernetesClusterDomain .Values.controllerManager.env }}
env:
{{- if .Values.kubernetesClusterDomain }}
Expand Down Expand Up @@ -80,9 +76,7 @@ spec:
command:
- /usr/local/bin/autoscaler
args:
{{- if .Values.concurrentAutoscalerSyncs }}
- --concurrent-autoscaler-syncs={{ .Values.concurrentAutoscalerSyncs }}
{{- end }}
- --health-probe-bind-address=:8091
- --metrics-bind-address=:8090
- --leader-elect
Expand Down
12 changes: 12 additions & 0 deletions charts/nebula-operator/templates/scheduler-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,17 @@ spec:
configMap:
name: scheduler-config
restartPolicy: Always
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

3 changes: 0 additions & 3 deletions charts/nebula-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ enableKruiseScheme: false
# Period at which the controller forces the repopulation of its local object stores. (default 0h30m0s)
syncPeriod: 0h30m0s

# Namespace the controller watches for updates to Kubernetes objects, If empty, all namespaces are watched.
watchNamespace:

# The number of NebulaCluster objects that are allowed to sync concurrently. (default 5)
concurrentNebulaClusterSyncs: 5

Expand Down
20 changes: 10 additions & 10 deletions doc/user/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,36 +94,36 @@ status:
```

### Validate rules
- Append storage volume
Append storage volume
```shell
$ kubectl patch nc nebula --type='merge' --patch '{"spec": {"storaged": {"dataVolumeClaims":[{"resources": {"requests": {"storage": "2Gi"}}, "storageClassName": "local-path"},{"resources": {"requests": {"storage": "3Gi"}}, "storageClassName": "fask-disks"}]}}}'
Error from server: admission webhook "nebulaclustervalidating.nebula-graph.io" denied the request: spec.storaged.dataVolumeClaims: Forbidden: storaged dataVolumeClaims is immutable
- ```
```

- Shrink PV
Shrink PV
```shell
$ kubectl patch nc nebula --type='merge' --patch '{"spec": {"storaged": {"dataVolumeClaims":[{"resources": {"requests": {"storage": "1Gi"}}, "storageClassName": "fast-disks"}]}}}'
Error from server: admission webhook "nebulaclustervalidating.nebula-graph.io" denied the request: spec.storaged.dataVolumeClaims: Invalid value: resource.Quantity{i:resource.int64Amount{value:1073741824, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"1Gi", Format:"BinarySI"}: data volume size can only be increased
- ```
```

- Modify thrift ports
Modify thrift ports
```shell
$ kubectl patch nc nebula --type='merge' --patch '{"spec": {"graphd": {"port": 8669}}}'
Error from server: admission webhook "nebulaclustervalidating.nebula-graph.io" denied the request: spec.graphd.port: Invalid value: 8669: field is immutable
- ```
```

- Intermediate state scaling
Scale in intermediate state
```shell
$ kubectl patch nc nebula --type='merge' --patch '{"spec": {"storaged": {"replicas": 5}}}'
nebulacluster.apps.nebula-graph.io/nebula patched
$ kubectl patch nc nebula --type='merge' --patch '{"spec": {"storaged": {"replicas": 3}}}'
Error from server: admission webhook "nebulaclustervalidating.nebula-graph.io" denied the request: [spec.storaged: Forbidden: field is immutable while in ScaleOut phase, spec.storaged.replicas: Invalid value: 3: field is immutable while not in Running phase]
- ```
```

- HA mode
HA mode
```shell
# Create a nebula cluster with 2 graphd, 3 metad, and 3 storaged to meet the minimum HA configuration requirement.
$ kubectl annotate nc nebula nebula-graph.io/ha-mode=true
$ kubectl patch nc nebula --type='merge' --patch '{"spec": {"graphd": {"replicas":1}}}'
Error from server: admission webhook "nebulaclustervalidating.nebula-graph.io" denied the request: spec.graphd.replicas: Invalid value: 1: should be at least 2 in HA mode
- ```
```