Skip to content

Bug: Reduce log "performed updated on restic deployment" #585

@kaovilai

Description

@kaovilai

Contact Details

No response

Describe bug

Fix this bug by only changing values if not the expected results.. especially pointers
cmp.Diff(prev, updatedDaemonset)

Spec: v1.DaemonSetSpec{
  		Selector: &{MatchLabels: {"component": "velero", "name": "restic"}},
  		Template: v1.PodTemplateSpec{
  			ObjectMeta: {Labels: {"component": "velero", "name": "restic"}},
  			Spec: v1.PodSpec{
  				Volumes: []v1.Volume{
  					{
  						Name: "host-pods",
  						VolumeSource: v1.VolumeSource{
  							HostPath: &v1.HostPathVolumeSource{
  								Path: "[/var/lib/kubelet/pods]()",
- 								Type: &"",
+ 								Type: nil,
  							},
  							EmptyDir:          nil,
  							GCEPersistentDisk: nil,
  							... // 26 identical fields
  						},
  					},
  					{Name: "scratch", VolumeSource: {EmptyDir: &{}}},
  					{Name: "certs", VolumeSource: {EmptyDir: &{}}},
  					{
  						Name: "bsl-cloud-credentials-gcp",
  						VolumeSource: v1.VolumeSource{
  							... // 3 identical fields
  							AWSElasticBlockStore: nil,
  							GitRepo:              nil,
  							Secret: &v1.SecretVolumeSource{
  								SecretName:  "bsl-cloud-credentials-gcp",
  								Items:       nil,
- 								DefaultMode: &420,
+ 								DefaultMode: nil,
  								Optional:    nil,
  							},
  							NFS:   nil,
  							ISCSI: nil,
  							... // 21 identical fields
  						},
  					},
  				},
  				InitContainers: nil,
  				Containers: []v1.Container{
  					{
  						... // 5 identical fields
  						Ports:   nil,
  						EnvFrom: nil,
  						Env: []v1.EnvVar{
  							{
  								Name:  "NODE_NAME",
  								Value: "",
  								ValueFrom: &v1.EnvVarSource{
  									FieldRef: &v1.ObjectFieldSelector{
- 										APIVersion: "v1",
+ 										APIVersion: "",
  										FieldPath:  "spec.nodeName",
  									},
  									ResourceFieldRef: nil,
  									ConfigMapKeyRef:  nil,
  									SecretKeyRef:     nil,
  								},
  							},
  							{
  								Name:  "VELERO_NAMESPACE",
  								Value: "",
  								ValueFrom: &v1.EnvVarSource{
  									FieldRef: &v1.ObjectFieldSelector{
- 										APIVersion: "v1",
+ 										APIVersion: "",
  										FieldPath:  "metadata.namespace",
  									},
  									ResourceFieldRef: nil,
  									ConfigMapKeyRef:  nil,
  									SecretKeyRef:     nil,
  								},
  							},
  							{Name: "VELERO_SCRATCH_DIR", Value: "[/scratch]()"},
  						},
  						Resources:    {Limits: {s"cpu": {i: {...}, s: "1", Format: "DecimalSI"}, s"memory": {i: {...}, Format: "BinarySI"}}, Requests: {s"cpu": {i: {...}, s: "500m", Format: "DecimalSI"}, s"memory": {i: {...}, Format: "BinarySI"}}},
  						VolumeMounts: {{Name: "host-pods", MountPath: "[/host_pods]()", MountPropagation: &"HostToContainer"}, {Name: "scratch", MountPath: "[/scratch]()"}, {Name: "certs", MountPath: "[/etc/ssl/certs]()"}},
  						... // 3 identical fields
  						StartupProbe:             nil,
  						Lifecycle:                nil,
- 						TerminationMessagePath:   "[/dev/termination-log]()",
+ 						TerminationMessagePath:   "",
- 						TerminationMessagePolicy: "File",
+ 						TerminationMessagePolicy: "",
  						ImagePullPolicy:          "Always",
  						SecurityContext:          &{Privileged: &true},
  						... // 3 identical fields
  					},
  				},
  				EphemeralContainers:           nil,
- 				RestartPolicy:                 "Always",
+ 				RestartPolicy:                 "",
- 				TerminationGracePeriodSeconds: &30,
+ 				TerminationGracePeriodSeconds: nil,
  				ActiveDeadlineSeconds:         nil,
- 				DNSPolicy:                     "ClusterFirst",
+ 				DNSPolicy:                     "",
  				NodeSelector:                  nil,
  				ServiceAccountName:            "velero",
- 				DeprecatedServiceAccount:      "velero",
+ 				DeprecatedServiceAccount:      "",
  				AutomountServiceAccountToken:  nil,
  				NodeName:                      "",
  				... // 7 identical fields
  				Subdomain:     "",
  				Affinity:      nil,
- 				SchedulerName: "default-scheduler",
+ 				SchedulerName: "",
  				Tolerations:   nil,
  				HostAliases:   nil,
  				... // 10 identical fields
  			},
  		},
  		UpdateStrategy: v1.DaemonSetUpdateStrategy{
  			Type:          "RollingUpdate",
- 			RollingUpdate: s"&RollingUpdateDaemonSet{MaxUnavailable:1,MaxSurge:0,}",
+ 			RollingUpdate: nil,
  		},
  		MinReadySeconds:      0,
- 		RevisionHistoryLimit: &10,
+ 		RevisionHistoryLimit: nil,
  	},

What happened?

unnecessary log print

OADP Version

0.5.x (Stable)

OpenShift Version

4.9

Velero pod logs

No response

Restic pod logs

No response

Operator pod logs

No response

New issue

  • This issue is new

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions