Tidy logging during fluxd startup
This removes a duplicate label from the AWS-specific logger.
@@ -186,8 +186,8 @@ func main() {
var clusterVersion string
var sshKeyRing ssh.KeyRing
var k8s cluster.Cluster
- var imageCreds func() registry.ImageCreds
var k8sManifests cluster.Manifests
+ var imageCreds func() registry.ImageCreds
{
restClientConfig, err := rest.InClusterConfig()
if err != nil {
@@ -265,7 +265,14 @@ func main() {
logger.Log("ping", true)
}
+ k8s = k8sInst
imageCreds = k8sInst.ImagesToFetch
+ // There is only one way we currently interpret a repo of
+ // files as manifests, and that's as Kubernetes yamels.
+ k8sManifests = &kubernetes.Manifests{}
+ }
+
+ // Wrap the procedure for collecting images to scan
{
awsConf := registry.AWSRegistryConfig{
Regions: *awsRegions,
@@ -273,7 +280,7 @@ func main() {
}
credsWithAWSAuth, err := registry.ImageCredsWithAWSAuth(imageCreds, log.With(logger, "component", "aws"), awsConf)
if err != nil {
- logger.Log("warning", "AWS authorization not used; pre-flight check failed", "err", err)
+ logger.Log("warning", "AWS authorization not used; pre-flight check failed")
} else {
imageCreds = credsWithAWSAuth
}
@@ -287,12 +294,6 @@ func main() {
}
}
- k8s = k8sInst
- // There is only one way we currently interpret a repo of
- // files as manifests, and that's as Kubernetes yamels.
- k8sManifests = &kubernetes.Manifests{}
- }
-
// Registry components
var cacheRegistry registry.Registry
var cacheWarmer *cache.Warmer
