Skip to content

Commit

Permalink
Merge pull request #4112 from camilamacedo86/fix-linter-issues-deploy…
Browse files Browse the repository at this point in the history
…-image

🐛 (deployimage/v1apha1): fix linter issues
  • Loading branch information
k8s-ci-robot authored Aug 29, 2024
2 parents c1bacc7 + f492ccc commit ac6f467
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (r *MemcachedReconciler) doFinalizerOperationsForMemcached(cr *cachev1alpha
// deploymentForMemcached returns a Memcached Deployment object
func (r *MemcachedReconciler) deploymentForMemcached(
memcached *cachev1alpha1.Memcached) (*appsv1.Deployment, error) {
ls := labelsForMemcached(memcached.Name)
ls := labelsForMemcached()
replicas := memcached.Spec.Size

// Get the Operand image
Expand Down Expand Up @@ -335,28 +335,28 @@ func (r *MemcachedReconciler) deploymentForMemcached(
// makefile target docker-buildx. Also, you can use docker manifest inspect <image>
// to check what are the platforms supported.
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
//Affinity: &corev1.Affinity{
// NodeAffinity: &corev1.NodeAffinity{
// RequiredDuringSchedulingIgnoredDuringExecution: &corev1.NodeSelector{
// NodeSelectorTerms: []corev1.NodeSelectorTerm{
// {
// MatchExpressions: []corev1.NodeSelectorRequirement{
// {
// Key: "kubernetes.io/arch",
// Operator: "In",
// Values: []string{"amd64", "arm64", "ppc64le", "s390x"},
// },
// {
// Key: "kubernetes.io/os",
// Operator: "In",
// Values: []string{"linux"},
// },
// },
// },
// },
// },
// },
//},
// Affinity: &corev1.Affinity{
// NodeAffinity: &corev1.NodeAffinity{
// RequiredDuringSchedulingIgnoredDuringExecution: &corev1.NodeSelector{
// NodeSelectorTerms: []corev1.NodeSelectorTerm{
// {
// MatchExpressions: []corev1.NodeSelectorRequirement{
// {
// Key: "kubernetes.io/arch",
// Operator: "In",
// Values: []string{"amd64", "arm64", "ppc64le", "s390x"},
// },
// {
// Key: "kubernetes.io/os",
// Operator: "In",
// Values: []string{"linux"},
// },
// },
// },
// },
// },
// },
// },
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: &[]bool{true}[0],
// IMPORTANT: seccomProfile was introduced with Kubernetes 1.19
Expand Down Expand Up @@ -403,7 +403,7 @@ func (r *MemcachedReconciler) deploymentForMemcached(

// labelsForMemcached returns the labels for selecting the resources
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
func labelsForMemcached(name string) map[string]string {
func labelsForMemcached() map[string]string {
var imageTag string
image, err := imageForMemcached()
if err == nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ func (r *{{ .Resource.Kind }}Reconciler) doFinalizerOperationsFor{{ .Resource.Ki
// deploymentFor{{ .Resource.Kind }} returns a {{ .Resource.Kind }} Deployment object
func (r *{{ .Resource.Kind }}Reconciler) deploymentFor{{ .Resource.Kind }}(
{{ lower .Resource.Kind }} *{{ .Resource.ImportAlias }}.{{ .Resource.Kind }}) (*appsv1.Deployment, error) {
ls := labelsFor{{ .Resource.Kind }}({{ lower .Resource.Kind }}.Name)
ls := labelsFor{{ .Resource.Kind }}()
replicas := {{ lower .Resource.Kind }}.Spec.Size
// Get the Operand image
Expand Down Expand Up @@ -389,28 +389,28 @@ func (r *{{ .Resource.Kind }}Reconciler) deploymentFor{{ .Resource.Kind }}(
// makefile target docker-buildx. Also, you can use docker manifest inspect <image>
// to check what are the platforms supported.
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
//Affinity: &corev1.Affinity{
// NodeAffinity: &corev1.NodeAffinity{
// RequiredDuringSchedulingIgnoredDuringExecution: &corev1.NodeSelector{
// NodeSelectorTerms: []corev1.NodeSelectorTerm{
// {
// MatchExpressions: []corev1.NodeSelectorRequirement{
// {
// Key: "kubernetes.io/arch",
// Operator: "In",
// Values: []string{"amd64", "arm64", "ppc64le", "s390x"},
// },
// {
// Key: "kubernetes.io/os",
// Operator: "In",
// Values: []string{"linux"},
// },
// },
// },
// },
// },
// },
//},
// Affinity: &corev1.Affinity{
// NodeAffinity: &corev1.NodeAffinity{
// RequiredDuringSchedulingIgnoredDuringExecution: &corev1.NodeSelector{
// NodeSelectorTerms: []corev1.NodeSelectorTerm{
// {
// MatchExpressions: []corev1.NodeSelectorRequirement{
// {
// Key: "kubernetes.io/arch",
// Operator: "In",
// Values: []string{"amd64", "arm64", "ppc64le", "s390x"},
// },
// {
// Key: "kubernetes.io/os",
// Operator: "In",
// Values: []string{"linux"},
// },
// },
// },
// },
// },
// },
// },
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: &[]bool{true}[0],
// IMPORTANT: seccomProfile was introduced with Kubernetes 1.19
Expand All @@ -436,7 +436,7 @@ func (r *{{ .Resource.Kind }}Reconciler) deploymentFor{{ .Resource.Kind }}(
// labelsFor{{ .Resource.Kind }} returns the labels for selecting the resources
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
func labelsFor{{ .Resource.Kind }}(name string) map[string]string {
func labelsFor{{ .Resource.Kind }}() map[string]string {
var imageTag string
image, err := imageFor{{ .Resource.Kind }}()
if err == nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (r *BusyboxReconciler) doFinalizerOperationsForBusybox(cr *examplecomv1alph
// deploymentForBusybox returns a Busybox Deployment object
func (r *BusyboxReconciler) deploymentForBusybox(
busybox *examplecomv1alpha1.Busybox) (*appsv1.Deployment, error) {
ls := labelsForBusybox(busybox.Name)
ls := labelsForBusybox()
replicas := busybox.Spec.Size

// Get the Operand image
Expand Down Expand Up @@ -335,28 +335,28 @@ func (r *BusyboxReconciler) deploymentForBusybox(
// makefile target docker-buildx. Also, you can use docker manifest inspect <image>
// to check what are the platforms supported.
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
//Affinity: &corev1.Affinity{
// NodeAffinity: &corev1.NodeAffinity{
// RequiredDuringSchedulingIgnoredDuringExecution: &corev1.NodeSelector{
// NodeSelectorTerms: []corev1.NodeSelectorTerm{
// {
// MatchExpressions: []corev1.NodeSelectorRequirement{
// {
// Key: "kubernetes.io/arch",
// Operator: "In",
// Values: []string{"amd64", "arm64", "ppc64le", "s390x"},
// },
// {
// Key: "kubernetes.io/os",
// Operator: "In",
// Values: []string{"linux"},
// },
// },
// },
// },
// },
// },
//},
// Affinity: &corev1.Affinity{
// NodeAffinity: &corev1.NodeAffinity{
// RequiredDuringSchedulingIgnoredDuringExecution: &corev1.NodeSelector{
// NodeSelectorTerms: []corev1.NodeSelectorTerm{
// {
// MatchExpressions: []corev1.NodeSelectorRequirement{
// {
// Key: "kubernetes.io/arch",
// Operator: "In",
// Values: []string{"amd64", "arm64", "ppc64le", "s390x"},
// },
// {
// Key: "kubernetes.io/os",
// Operator: "In",
// Values: []string{"linux"},
// },
// },
// },
// },
// },
// },
// },
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: &[]bool{true}[0],
// IMPORTANT: seccomProfile was introduced with Kubernetes 1.19
Expand Down Expand Up @@ -397,7 +397,7 @@ func (r *BusyboxReconciler) deploymentForBusybox(

// labelsForBusybox returns the labels for selecting the resources
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
func labelsForBusybox(name string) map[string]string {
func labelsForBusybox() map[string]string {
var imageTag string
image, err := imageForBusybox()
if err == nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (r *MemcachedReconciler) doFinalizerOperationsForMemcached(cr *examplecomv1
// deploymentForMemcached returns a Memcached Deployment object
func (r *MemcachedReconciler) deploymentForMemcached(
memcached *examplecomv1alpha1.Memcached) (*appsv1.Deployment, error) {
ls := labelsForMemcached(memcached.Name)
ls := labelsForMemcached()
replicas := memcached.Spec.Size

// Get the Operand image
Expand Down Expand Up @@ -335,28 +335,28 @@ func (r *MemcachedReconciler) deploymentForMemcached(
// makefile target docker-buildx. Also, you can use docker manifest inspect <image>
// to check what are the platforms supported.
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
//Affinity: &corev1.Affinity{
// NodeAffinity: &corev1.NodeAffinity{
// RequiredDuringSchedulingIgnoredDuringExecution: &corev1.NodeSelector{
// NodeSelectorTerms: []corev1.NodeSelectorTerm{
// {
// MatchExpressions: []corev1.NodeSelectorRequirement{
// {
// Key: "kubernetes.io/arch",
// Operator: "In",
// Values: []string{"amd64", "arm64", "ppc64le", "s390x"},
// },
// {
// Key: "kubernetes.io/os",
// Operator: "In",
// Values: []string{"linux"},
// },
// },
// },
// },
// },
// },
//},
// Affinity: &corev1.Affinity{
// NodeAffinity: &corev1.NodeAffinity{
// RequiredDuringSchedulingIgnoredDuringExecution: &corev1.NodeSelector{
// NodeSelectorTerms: []corev1.NodeSelectorTerm{
// {
// MatchExpressions: []corev1.NodeSelectorRequirement{
// {
// Key: "kubernetes.io/arch",
// Operator: "In",
// Values: []string{"amd64", "arm64", "ppc64le", "s390x"},
// },
// {
// Key: "kubernetes.io/os",
// Operator: "In",
// Values: []string{"linux"},
// },
// },
// },
// },
// },
// },
// },
SecurityContext: &corev1.PodSecurityContext{
RunAsNonRoot: &[]bool{true}[0],
// IMPORTANT: seccomProfile was introduced with Kubernetes 1.19
Expand Down Expand Up @@ -403,7 +403,7 @@ func (r *MemcachedReconciler) deploymentForMemcached(

// labelsForMemcached returns the labels for selecting the resources
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
func labelsForMemcached(name string) map[string]string {
func labelsForMemcached() map[string]string {
var imageTag string
image, err := imageForMemcached()
if err == nil {
Expand Down

0 comments on commit ac6f467

Please sign in to comment.