Skip to content

Commit 2c79489

Browse files
committed
chore: please linters
Signed-off-by: Oliver Gondža <ogondza@gmail.com>
1 parent 51d93c1 commit 2c79489

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

controllers/argocd/argocd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func NewCR(name, ns string, client client.Client) (*argoapp.ArgoCD, error) {
255255
ApplicationSet: getArgoApplicationSetSpec(),
256256
Controller: getArgoControllerSpec(),
257257
SSO: getArgoSSOSpec(client),
258-
Grafana: getArgoGrafanaSpec(),
258+
Grafana: getArgoGrafanaSpec(), //nolint:staticcheck // Deprecated field
259259
HA: getArgoHASpec(),
260260
Redis: getArgoRedisSpec(),
261261
Repo: getArgoRepoServerSpec(),

controllers/consoleplugin.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,10 @@ func (r *ReconcileGitopsService) reconcileDeployment(cr *pipelinesv1alpha1.Gitop
386386

387387
// ADD THIS: Get ConfigMap and add hash to pod template annotations
388388
configMapHash := getConfigMapHash(newPluginConfigMap)
389-
if newPluginDeployment.Spec.Template.ObjectMeta.Annotations == nil {
390-
newPluginDeployment.Spec.Template.ObjectMeta.Annotations = make(map[string]string)
389+
if newPluginDeployment.Spec.Template.Annotations == nil {
390+
newPluginDeployment.Spec.Template.Annotations = make(map[string]string)
391391
}
392-
newPluginDeployment.Spec.Template.ObjectMeta.Annotations["httpd-cfg-hash"] = configMapHash
392+
newPluginDeployment.Spec.Template.Annotations["httpd-cfg-hash"] = configMapHash
393393

394394
// Check if this Deployment already exists
395395
existingPluginDeployment := &appsv1.Deployment{}
@@ -413,7 +413,7 @@ func (r *ReconcileGitopsService) reconcileDeployment(cr *pipelinesv1alpha1.Gitop
413413
!equality.Semantic.DeepEqual(existingPluginDeployment.Spec.Replicas, newPluginDeployment.Spec.Replicas) ||
414414
!equality.Semantic.DeepEqual(existingPluginDeployment.Spec.Selector, newPluginDeployment.Spec.Selector) ||
415415
!equality.Semantic.DeepEqual(existingSpecTemplate.Labels, newSpecTemplate.Labels) ||
416-
!equality.Semantic.DeepEqual(existingSpecTemplate.ObjectMeta.Annotations["httpd-cfg-hash"], newSpecTemplate.ObjectMeta.Annotations["httpd-cfg-hash"]) ||
416+
!equality.Semantic.DeepEqual(existingSpecTemplate.Annotations["httpd-cfg-hash"], newSpecTemplate.Annotations["httpd-cfg-hash"]) ||
417417
!equality.Semantic.DeepEqual(sortContainers(existingSpecTemplate.Spec.Containers), sortContainers(newSpecTemplate.Spec.Containers)) ||
418418
!equality.Semantic.DeepEqual(sortVolumes(existingSpecTemplate.Spec.Volumes), sortVolumes(newSpecTemplate.Spec.Volumes)) ||
419419
!equality.Semantic.DeepEqual(existingSpecTemplate.Spec.RestartPolicy, newSpecTemplate.Spec.RestartPolicy) ||
@@ -424,15 +424,15 @@ func (r *ReconcileGitopsService) reconcileDeployment(cr *pipelinesv1alpha1.Gitop
424424
!equality.Semantic.DeepEqual(existingSpecTemplate.Spec.Containers[0].Resources, newSpecTemplate.Spec.Containers[0].Resources)
425425

426426
if changed {
427-
if existingSpecTemplate.ObjectMeta.Annotations == nil {
428-
existingSpecTemplate.ObjectMeta.Annotations = make(map[string]string)
427+
if existingSpecTemplate.Annotations == nil {
428+
existingSpecTemplate.Annotations = make(map[string]string)
429429
}
430430
reqLogger.Info("Reconciling plugin deployment", "Namespace", existingPluginDeployment.Namespace, "Name", existingPluginDeployment.Name)
431431
existingPluginDeployment.Labels = newPluginDeployment.Labels
432432
existingPluginDeployment.Spec.Replicas = newPluginDeployment.Spec.Replicas
433433
existingPluginDeployment.Spec.Selector = newPluginDeployment.Spec.Selector
434434
existingSpecTemplate.Labels = newSpecTemplate.Labels
435-
existingSpecTemplate.ObjectMeta.Annotations["httpd-cfg-hash"] = newSpecTemplate.ObjectMeta.Annotations["httpd-cfg-hash"]
435+
existingSpecTemplate.Annotations["httpd-cfg-hash"] = newSpecTemplate.Annotations["httpd-cfg-hash"]
436436
existingSpecTemplate.Spec.SecurityContext = newSpecTemplate.Spec.SecurityContext
437437
existingSpecTemplate.Spec.Containers = newSpecTemplate.Spec.Containers
438438
existingSpecTemplate.Spec.Volumes = newSpecTemplate.Spec.Volumes

test/openshift/e2e/ginkgo/parallel/1-032_validate_dynamic_scaling_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
7070
Spec: argov1beta1api.ArgoCDSpec{
7171
Controller: argov1beta1api.ArgoCDApplicationControllerSpec{
7272
Sharding: argov1beta1api.ArgoCDApplicationControllerShardSpec{
73-
DynamicScalingEnabled: new(true),
73+
DynamicScalingEnabled: new(true), //nolint:staticcheck // Test for a deprecated field
7474
MinShards: 1,
7575
MaxShards: 4,
7676
ClustersPerShard: 1,

0 commit comments

Comments
 (0)