Skip to content

E2echeckPodSpec #48

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

Draft
wants to merge 1 commit into
base: noDefaultBackupLocatione2e
Choose a base branch
from
Draft

Conversation

kaovilai
Copy link
Owner

No description provided.

@kaovilai
Copy link
Owner Author

Not sure how implementable this is..
Maybe just compare a few fields that do not contain unique runtime changes such as UIDs.

Will take awhile to take care of writing out desired spec..

v1.PodSpec{
  	Volumes: []v1.Volume{
  		{Name: "plugins", VolumeSource: {EmptyDir: &{}}},
  		{Name: "scratch", VolumeSource: {EmptyDir: &{}}},
  		{Name: "certs", VolumeSource: {EmptyDir: &{}}},
- 		{
- 			Name:         "cloud-credentials",
- 			VolumeSource: v1.VolumeSource{Secret: s"&SecretVolumeSource{SecretName:cloud-credentials,Items:[]KeyToPa"...},
- 		},
- 		{
- 			Name:         "bsl-cloud-credentials-aws",
- 			VolumeSource: v1.VolumeSource{Secret: s"&SecretVolumeSource{SecretName:bsl-cloud-credentials-aws,Items:["...},
- 		},
- 		{
- 			Name: "kube-api-access-ch5rb",
- 			VolumeSource: v1.VolumeSource{
- 				Projected: s"&ProjectedVolumeSource{Sources:[]VolumeProjection{VolumeProjecti"...,
- 			},
- 		},
  	},
  	InitContainers: []v1.Container{
- 		{
- 			Name:  "openshift-velero-plugin",
- 			Image: "quay.io/konveyor/openshift-velero-plugin:latest",
- 			VolumeMounts: []v1.VolumeMount{
- 				{Name: "plugins", MountPath: "/target"},
- 				{
- 					Name:      "kube-api-access-ch5rb",
- 					ReadOnly:  true,
- 					MountPath: "/var/run/secrets/kubernetes.io/s"...,
- 				},
- 			},
- 			TerminationMessagePath:   "/dev/termination-log",
- 			TerminationMessagePolicy: "File",
- 			ImagePullPolicy:          "Always",
- 			SecurityContext:          s"&SecurityContext{Capabilities:&Capabilities{Add:[],Drop:[KILL MKNOD SETGID SETUID],},Privileged:nil,SELinuxOptions:nil,RunAsUser"...,
- 		},
- 		{
- 			Name:  "velero-plugin-for-aws",
- 			Image: "quay.io/konveyor/velero-plugin-for-aws:latest",
- 			VolumeMounts: []v1.VolumeMount{
- 				{Name: "plugins", MountPath: "/target"},
- 				{
- 					Name:      "kube-api-access-ch5rb",
- 					ReadOnly:  true,
- 					MountPath: "/var/run/secrets/kubernetes.io/s"...,
- 				},
- 			},
- 			TerminationMessagePath:   "/dev/termination-log",
- 			TerminationMessagePolicy: "File",
- 			ImagePullPolicy:          "Always",
- 			SecurityContext:          s"&SecurityContext{Capabilities:&Capabilities{Add:[],Drop:[KILL MKNOD SETGID SETUID],},Privileged:nil,SELinuxOptions:nil,RunAsUser"...,
- 		},
- 		{
- 			Name:  "kubevirt-velero-plugin",
- 			Image: "quay.io/konveyor/kubevirt-velero-plugin:v0.2.0",
- 			VolumeMounts: []v1.VolumeMount{
- 				{Name: "plugins", MountPath: "/target"},
- 				{
- 					Name:      "kube-api-access-ch5rb",
- 					ReadOnly:  true,
- 					MountPath: "/var/run/secrets/kubernetes.io/s"...,
- 				},
- 			},
- 			TerminationMessagePath:   "/dev/termination-log",
- 			TerminationMessagePolicy: "File",
- 			ImagePullPolicy:          "Always",
- 			SecurityContext:          s"&SecurityContext{Capabilities:&Capabilities{Add:[],Drop:[KILL MKNOD SETGID SETUID],},Privileged:nil,SELinuxOptions:nil,RunAsUser"...,
- 		},
  	},
  	Containers: []v1.Container{
  		{
  			... // 3 identical fields
  			Args:       {"server", "--restic-timeout=1h"},
  			WorkingDir: "",
  			Ports: []v1.ContainerPort{
  				{
  					Name:          "metrics",
  					HostPort:      0,
  					ContainerPort: 8085,
- 					Protocol:      "TCP",
+ 					Protocol:      "",
  					HostIP:        "",
  				},
  			},
  			EnvFrom: nil,
  			Env: []v1.EnvVar{
  				{Name: "VELERO_SCRATCH_DIR", Value: "/scratch"},
  				{
  					Name:  "VELERO_NAMESPACE",
  					Value: "",
  					ValueFrom: &v1.EnvVarSource{
  						FieldRef: &v1.ObjectFieldSelector{
- 							APIVersion: "v1",
+ 							APIVersion: "",
  							FieldPath:  "metadata.namespace",
  						},
  						ResourceFieldRef: nil,
  						ConfigMapKeyRef:  nil,
  						SecretKeyRef:     nil,
  					},
  				},
  				{Name: "LD_LIBRARY_PATH", Value: "/plugins"},
- 				{Name: "AWS_SHARED_CREDENTIALS_FILE", Value: "/credentials/cloud"},
  			},
  			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: []v1.VolumeMount{
  				{Name: "plugins", MountPath: "/plugins"},
  				{Name: "scratch", MountPath: "/scratch"},
  				{Name: "certs", MountPath: "/etc/ssl/certs"},
- 				{Name: "cloud-credentials", MountPath: "/credentials"},
- 				{Name: "bsl-cloud-credentials-aws", MountPath: "/bsl-cloud-credentials-aws"},
- 				{
- 					Name:      "kube-api-access-ch5rb",
- 					ReadOnly:  true,
- 					MountPath: "/var/run/secrets/kubernetes.io/serviceaccount",
- 				},
  			},
  			VolumeDevices:            nil,
  			LivenessProbe:            nil,
  			ReadinessProbe:           nil,
  			StartupProbe:             nil,
  			Lifecycle:                nil,
- 			TerminationMessagePath:   "/dev/termination-log",
+ 			TerminationMessagePath:   "",
- 			TerminationMessagePolicy: "File",
+ 			TerminationMessagePolicy: "",
  			ImagePullPolicy:          "Always",
- 			SecurityContext:          s"&SecurityContext{Capabilities:&Capabilities{Add:[],Drop:[KILL MKNOD SETGID SETUID],},Privileged:nil,SELinuxOptions:nil,RunAsUser:*1001030000,RunAsNonRoot:nil,ReadOnlyRootFilesystem:nil,AllowPrivilegeEscalation:nil,RunAsGroup:nil,ProcMount:nil,WindowsOption"...,
+ 			SecurityContext:          nil,
  			Stdin:                    false,
  			StdinOnce:                false,
  			TTY:                      false,
  		},
  	},
  	EphemeralContainers:           nil,
  	RestartPolicy:                 "Always",
- 	TerminationGracePeriodSeconds: &30,
+ 	TerminationGracePeriodSeconds: nil,
  	ActiveDeadlineSeconds:         nil,
- 	DNSPolicy:                     "ClusterFirst",
+ 	DNSPolicy:                     "",
  	NodeSelector:                  nil,
  	ServiceAccountName:            "velero",
- 	DeprecatedServiceAccount:      "velero",
+ 	DeprecatedServiceAccount:      "",
  	AutomountServiceAccountToken:  nil,
- 	NodeName:                      "ip-10-0-153-144.ec2.internal",
+ 	NodeName:                      "",
  	HostNetwork:                   false,
  	HostPID:                       false,
  	HostIPC:                       false,
  	ShareProcessNamespace:         nil,
- 	SecurityContext:               s"&PodSecurityContext{SELinuxOptions:&SELinuxOptions{User:,Role:,Type:,Level:s0:c32,c19,},RunAsUser:nil,RunAsNonRoot:nil,SupplementalGroups:[],FSGroup:*1001030000,RunAsGroup:nil,Sysctls:[]Sysctl{},WindowsOptions:nil,FSGroupChangePolicy:nil,SeccompProfile:nil,}",
+ 	SecurityContext:               nil,
- 	ImagePullSecrets:              []v1.LocalObjectReference{{Name: "velero-dockercfg-zd9sb"}},
+ 	ImagePullSecrets:              nil,
  	Hostname:                      "",
  	Subdomain:                     "",
  	Affinity:                      nil,
- 	SchedulerName:                 "default-scheduler",
+ 	SchedulerName:                 "",
- 	Tolerations: []v1.Toleration{
- 		{
- 			Key:               "node.kubernetes.io/not-ready",
- 			Operator:          "Exists",
- 			Effect:            "NoExecute",
- 			TolerationSeconds: &300,
- 		},
- 		{
- 			Key:               "node.kubernetes.io/unreachable",
- 			Operator:          "Exists",
- 			Effect:            "NoExecute",
- 			TolerationSeconds: &300,
- 		},
- 		{
- 			Key:      "node.kubernetes.io/memory-pressure",
- 			Operator: "Exists",
- 			Effect:   "NoSchedule",
- 		},
- 	},
+ 	Tolerations:               nil,
  	HostAliases:               nil,
  	PriorityClassName:         "",
- 	Priority:                  &0,
+ 	Priority:                  nil,
  	DNSConfig:                 nil,
  	ReadinessGates:            nil,
  	RuntimeClassName:          nil,
- 	EnableServiceLinks:        &true,
+ 	EnableServiceLinks:        nil,
- 	PreemptionPolicy:          &"PreemptLowerPriority",
+ 	PreemptionPolicy:          nil,
  	Overhead:                  nil,
  	TopologySpreadConstraints: nil,
  	SetHostnameAsFQDN:         nil,
  }

@kaovilai kaovilai force-pushed the noDefaultBackupLocatione2e branch from 0b4c8b0 to 52530c0 Compare May 28, 2022 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant