diff --git a/Makefile b/Makefile index 5a6bec211..5987ca09e 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ STORAGE_NAMESPACE ?= "${shell kubectl get sa default -o jsonpath='{.metadata.nam ES_OPERATOR_NAMESPACE = openshift-logging LD_FLAGS ?= "-X $(VERSION_PKG).version=$(OPERATOR_VERSION) -X $(VERSION_PKG).buildDate=$(VERSION_DATE) -X $(VERSION_PKG).defaultJaeger=$(JAEGER_VERSION)" -PACKAGES := $(shell go list ./cmd/... ./pkg/...) +PACKAGES := $(shell go list ./cmd/... ./pkg/... | grep -v elasticsearch/v1) .DEFAULT_GOAL := build @@ -41,7 +41,7 @@ format: .PHONY: lint lint: @echo Linting... - @golint $(PACKAGES) + @golint -set_exit_status=1 $(PACKAGES) @gosec -quiet -exclude=G104 $(PACKAGES) 2>/dev/null .PHONY: build diff --git a/pkg/account/main.go b/pkg/account/main.go index d9a98ea80..56ce59140 100644 --- a/pkg/account/main.go +++ b/pkg/account/main.go @@ -45,6 +45,7 @@ func getMain(jaeger *v1.Jaeger) *corev1.ServiceAccount { } } +// JaegerServiceAccountFor prints service name for Jaeger instance func JaegerServiceAccountFor(jaeger *v1.Jaeger) string { return fmt.Sprintf("%s", jaeger.Name) } diff --git a/pkg/storage/elasticsearch_secrets.go b/pkg/storage/elasticsearch_secrets.go index c639802f6..a78707178 100644 --- a/pkg/storage/elasticsearch_secrets.go +++ b/pkg/storage/elasticsearch_secrets.go @@ -88,8 +88,10 @@ func ESSecrets(jaeger *v1.Jaeger) []corev1.Secret { } } -// The secrets are pulled back to FS in case of operator restart -// The script checks if secrets are expired or need to be regenerated +// CreateESCerts creates certificates for elasticsearch, jaeger and curator +// The cert generation is done by shell script. If the certificates are not present +// on the filesystem the operator injects them from secrets - this allows operator restarts. +// The script also re-generates expired certificates. func CreateESCerts(jaeger *v1.Jaeger, existingSecrets []corev1.Secret) error { err := extractSecretsToFile(jaeger, existingSecrets, masterSecret, esSecret, jaegerSecret, curatorSecret) if err != nil {