Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deploy/charts/fleetshard-sync/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ spec:
value: {{ .Values.clusterName }}
- name: ENVIRONMENT
value: {{ .Values.environment }}
- name: GLOG_V
value: {{ .Values.glogVerbosity | quote }}
- name: CREATE_AUTH_PROVIDER
value: "{{ .Values.createAuthProvider }}"
- name: AUTH_TYPE
Expand Down
5 changes: 5 additions & 0 deletions deploy/charts/fleetshard-sync/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ createAuthProvider: true
# Static token can be issued by the kubernetes issuer with the following command:
# $ kubectl create token -n rhacs fleetshard-sync --audience acs-fleet-manager-private-api
staticToken: ""
# glog verbosity level (see CONTRIBUTING.md for guidelines)
# 1: Production level logging - no unnecessary spam, no sensitive information
# 5: Stage/test level logging - useful debugging information, not spammy
# 10: Local/debug level logging - useful for tracing transactions during development
glogVerbosity: "1"
auditLogs:
enabled: true
skipTLSVerify: true
Expand Down
1 change: 1 addition & 0 deletions fleetshard/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type Config struct {
ServiceAccountTokenFile string `env:"FLEET_MANAGER_TOKEN_FILE"`
CreateAuthProvider bool `env:"CREATE_AUTH_PROVIDER" envDefault:"false"`
MetricsAddress string `env:"FLEETSHARD_METRICS_ADDRESS" envDefault:":8080"`
LogVerbosity string `env:"GLOG_V" envDefault:"1"`
DefaultBaseCRDURL string `env:"DEFAULT_BASE_CRD_URL" envDefault:"https://raw.githubusercontent.com/stackrox/stackrox/%s/operator/bundle/manifests/"`
// TenantImagePullSecret can be used to inject a Kubernetes image pull secret into tenant namespaces.
// If it is empty, nothing is injected (for example, it is not required when running on OpenShift).
Expand Down
8 changes: 6 additions & 2 deletions fleetshard/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"k8s.io/client-go/informers"

"github.com/golang/glog"
"github.com/stackrox/acs-fleet-manager/fleetshard/config"
cfg "github.com/stackrox/acs-fleet-manager/fleetshard/config"
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/fleetshardmetrics"
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/k8s"
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/runtime"
Expand All @@ -35,10 +35,13 @@ func main() {
glog.Info("Unable to set logtostderr to true")
}

config, err := config.GetConfig()
config, err := cfg.GetConfig()
if err != nil {
glog.Fatalf("Failed to load configuration: %v", err)
}
if err := flag.Set("v", config.LogVerbosity); err != nil {
glog.Errorf("Unable to set glog verbosity: %v", err)
}

ctx, cancel := context.WithTimeout(context.Background(), config.StartupTimeout)
defer cancel()
Expand All @@ -47,6 +50,7 @@ func main() {
glog.Infof("ClusterID: %s", config.ClusterID)
glog.Infof("RuntimePollPeriod: %s", config.RuntimePollPeriod.String())
glog.Infof("AuthType: %s", config.AuthType)
glog.Infof("LogVerbosity: %s", config.LogVerbosity)
glog.Infof("ManagedDB.Enabled: %t", config.ManagedDB.Enabled)
glog.Infof("ManagedDB.SecurityGroup: %s", config.ManagedDB.SecurityGroup)
glog.Infof("ManagedDB.SubnetGroup: %s", config.ManagedDB.SubnetGroup)
Expand Down
Loading