Skip to content

Commit

Permalink
Merge pull request spidernet-io#4322 from cyclinder/charts/fix_daemonset
Browse files Browse the repository at this point in the history
charts: Fix error nident in daemonset.yaml
  • Loading branch information
weizhoublue authored Nov 27, 2024
2 parents 96f87d0 + 3137929 commit b6d671a
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)
}

return InjectPodNetwork(pod, *multusConfigs)
Expand Down

0 comments on commit b6d671a

Please sign in to comment.