Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail lint goal if not empty #372

Merged
merged 1 commit into from
Apr 10, 2019
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C’est la vie...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oui c'est triste


.DEFAULT_GOAL := build

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions pkg/account/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
6 changes: 4 additions & 2 deletions pkg/storage/elasticsearch_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down