Skip to content

Commit

Permalink
More linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Oct 24, 2023
1 parent f0ef80a commit b1f4d56
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions cmd/generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Copyright 2021 Upbound Inc.
package main

import (
"encoding/json"
"encoding/json"
"fmt"
"os"
"path/filepath"
Expand All @@ -16,7 +16,6 @@ import (
"github.com/crossplane/upjet/pkg/pipeline"
"gopkg.in/alecthomas/kingpin.v2"


"github.com/philips-software/provider-hsdp/config"
)

Expand Down
18 changes: 9 additions & 9 deletions cmd/provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/leaderelection/resourcelock"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/philips-software/provider-hsdp/apis"
Expand All @@ -37,9 +37,9 @@ func main() {
var (
app = kingpin.New(filepath.Base(os.Args[0]), "Terraform based Crossplane provider for HSDP").DefaultEnvars()
debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool()
syncInterval = app.Flag("sync", "Sync interval controls how often all resources will be double checked for drift.").Short('s').Default("1h").Duration()
pollInterval = app.Flag("poll", "Poll interval controls how often an individual resource should be checked for drift.").Default("10m").Duration()
pollJitter = app.Flag("poll-jitter", "If non-zero, varies the poll interval by a random amount up to plus-or-minus this value.").Default("1m").Duration()
syncInterval = app.Flag("sync", "Sync interval controls how often all resources will be double checked for drift.").Short('s').Default("1h").Duration()
pollInterval = app.Flag("poll", "Poll interval controls how often an individual resource should be checked for drift.").Default("10m").Duration()
pollJitter = app.Flag("poll-jitter", "If non-zero, varies the poll interval by a random amount up to plus-or-minus this value.").Default("1m").Duration()
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool()
terraformVersion = app.Flag("terraform-version", "Terraform version.").Required().Envar("TERRAFORM_VERSION").String()
providerSource = app.Flag("terraform-provider-source", "Terraform provider source.").Required().Envar("TERRAFORM_PROVIDER_SOURCE").String()
Expand All @@ -60,8 +60,8 @@ func main() {
// logger when we're running in debug mode.
ctrl.SetLogger(zl)
}
log.Debug("Starting",

log.Debug("Starting",
"sync-period", syncInterval.String(),
"poll-interval", pollInterval.String(),
"poll-jitter", pollJitter.String(),
Expand All @@ -71,7 +71,7 @@ func main() {
kingpin.FatalIfError(err, "Cannot get API server rest config")

mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Cache: cache.Options{
Cache: cache.Options{
SyncPeriod: syncInterval,
},
LeaderElection: *leaderElection,
Expand All @@ -95,8 +95,8 @@ func main() {
WorkspaceStore: terraform.NewWorkspaceStore(log),
SetupFn: clients.TerraformSetupBuilder(*terraformVersion, *providerSource, *providerVersion),
}
if *enableExternalSecretStores {

if *enableExternalSecretStores {
o.Features.Enable(features.EnableAlphaExternalSecretStores)
log.Info("Alpha feature enabled", "flag", features.EnableAlphaExternalSecretStores)

Expand Down

0 comments on commit b1f4d56

Please sign in to comment.