Skip to content

Commit

Permalink
charts: Fix error nident in daemonset.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Cyclinder Kuo <[email protected]>
  • Loading branch information
cyclinder committed Nov 27, 2024
1 parent 675a672 commit 3137929
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charts/spiderpool/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ spec:
{{- if .Values.multus.multusCNI.defaultCniCRName }}
- name: MULTUS_CLUSTER_NETWORK
value: {{ .Release.Namespace }}/{{ .Values.multus.multusCNI.defaultCniCRName }}
{{ end }}
{{- end }}
{{- with .Values.spiderpoolAgent.extraEnv }}
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if or .Values.spiderpoolAgent.tuneSysctlConfig .Values.spiderpoolAgent.securityContext }}
securityContext:
Expand Down
4 changes: 2 additions & 2 deletions cmd/spiderpool-controller/cmd/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ func initControllerServiceManagers(ctx context.Context) {
controllerContext.PodManager = podManager

if controllerContext.Cfg.PodResourceInjectConfig.Enabled {
logger.Debug("Begin to init Pod MutatingWebhook")
logger.Info("Begin to init Pod MutatingWebhook")
if err := podmanager.InitPodWebhook(controllerContext.ClientSet.AdmissionregistrationV1(),
controllerContext.CRDManager, controllerContext.Cfg.ControllerDeploymentName,
controllerContext.Cfg.PodResourceInjectConfig.NamespacesExclude,
controllerContext.Cfg.PodResourceInjectConfig.NamespacesInclude); err != nil {
logger.Fatal(err.Error())
}
} else {
logger.Debug("InjectPodNetworkResource is disabled, try to remove the pod part in the MutatingWebhook")
logger.Info("InjectPodNetworkResource is disabled, try to remove the pod part in the MutatingWebhook")
if err := podmanager.RemovePodMutatingWebhook(controllerContext.ClientSet.AdmissionregistrationV1(),
controllerContext.Cfg.ControllerDeploymentName); err != nil {
logger.Error(err.Error())
Expand Down
2 changes: 1 addition & 1 deletion pkg/podmanager/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func podNetworkMutatingWebhook(spiderClient crdclientset.Interface, pod *corev1.
}

if len(multusConfigs.Items) == 0 {
return fmt.Errorf("No spidermultusconfig with label %v:%v found", constant.AnnoPodResourceInject, multusLabelValue)
return fmt.Errorf("No spidermultusconfigs with annotation: %v:%v found", constant.AnnoPodResourceInject, multusLabelValue)

Check warning on line 107 in pkg/podmanager/utils.go

View check run for this annotation

Codecov / codecov/patch

pkg/podmanager/utils.go#L107

Added line #L107 was not covered by tests
}

return InjectPodNetwork(pod, *multusConfigs)
Expand Down

0 comments on commit 3137929

Please sign in to comment.