-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Fix minio tokengen race #7985
Fix minio tokengen race #7985
Conversation
./tools/diff_coverage.sh ../loki-target-branch/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell. + ingester 0%
+ distributor 0%
+ querier 0%
+ querier/queryrange 0.1%
+ iter 0%
+ storage 0%
+ chunkenc 0%
+ logql 0%
+ loki 0% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome. It's a breaking change though. It should come with 4.0 of the Helm chart.
@@ -1,7 +1,8 @@ | |||
.PHONY: loki-distributed down add-repos update-repos prepare build-latest-image | |||
|
|||
IMAGE_TAG := $(shell ../../../tools/image-tag) | |||
REGISTRY_PORT ?= $(shell k3d registry list -o json | jq -r '.[] | select(.name == "k3d-grafana") | .portMappings."5000/tcp" | .[0].HostPort') | |||
EXISTING_REGISTRY_PORT := $(shell k3d registry list -o json | jq -r '.[] | select(.name == "k3d-grafana") | .portMappings."5000/tcp" | .[0].HostPort') | |||
REGISTRY_PORT ?= $(or $(EXISTING_REGISTRY_PORT),46453) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's been an issue on my side 🙂
@@ -0,0 +1,12 @@ | |||
# Empty Helm Cluster | |||
|
|||
This is a cluster designed for testing out helm charts. It is meant for running `helm install` against. It provides the required dependencies of the helm chart and nothing else (ie. minio is installed by the helm chart). This differs from the other envs that, while also using the helm chart, use `tanka` to deploy those charts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a cluster designed for testing out helm charts. It is meant for running `helm install` against. It provides the required dependencies of the helm chart and nothing else (ie. minio is installed by the helm chart). This differs from the other envs that, while also using the helm chart, use `tanka` to deploy those charts. | |
This is a cluster designed for testing out Helm charts. It is meant for running `helm install` against. It provides the required dependencies of the Helm chart and nothing else (ie. minio is installed by the Helm chart). This differs from the other envs that, while also using the helm chart, use `tanka` to deploy those charts. |
}, | ||
|
||
minioNamespace: k.core.v1.namespace.new('minio'), | ||
minio: helm.template('minio', '../../charts/minio', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have a values file instead? I'd love to document the steps without some automation.
./tools/diff_coverage.sh ../loki-target-branch/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell. + ingester 0%
+ distributor 0%
+ querier 0%
+ querier/queryrange 0%
+ iter 0%
+ storage 0%
+ chunkenc 0%
+ logql 0%
+ loki 0% |
Replacing with #8064, which fixes this problem without removing minio |
…rafana#8064) **What this PR does / why we need it**: This PR replaces grafana#7985. It solves the same problem, which is the race condition between the minio create bucket job and the enterprise tokengen job, but without removing minio.
What this PR does / why we need it:
Removes MinIO from the loki helm chart. This was meant as a convenience, but there's currently no good way to determine the helm run order of jobs defined by the loki helm chart and those of the subchart. As a result, when using minio, it can often occur that the make buckets job doesn't run before the tokengen, which will cause the whole deployment to fail as the provisioner depends on the admin token generated in the tokengen job.
I think it's reasonable to expect people to bring their own object storage.
Other possible solutions
I'm not sure how helm hook weights work between charts and their dependencies. We may be able to solve this with hook weights, and is worth testing before merging this.
TODO:
Special notes for your reviewer:
This is built on #7984 and includes changes from that PR.
Checklist
CONTRIBUTING.md
guideCHANGELOG.md
updateddocs/sources/upgrading/_index.md