-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
*: Generate all manifests #908
Conversation
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.
We should update the RELEASE.md as well, to include steps to generate the manifests.
README.md
Outdated
@@ -214,7 +214,7 @@ service account token that has read-only access to the Kubernetes cluster. | |||
|
|||
#### Kubernetes Deployment | |||
|
|||
To deploy this project, you can simply run `kubectl apply -f kubernetes` and a | |||
To deploy this project, you can simply run `kubectl apply -f kubernetes/standard` and a |
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.
standard? Hmm we can come up with a better name I think here.
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.
Any suggestions? I haven't been able to come up with anything better, and this is the standard way to deploy kube-state-metrics.
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.
We said we want to also since we moving it, rename the directory to examples
.
kubernetes/autosharding/service.yaml
Outdated
@@ -1,21 +1,19 @@ | |||
apiVersion: v1 | |||
kind: Service | |||
metadata: | |||
labels: | |||
app.kubernetes.io/name: kube-state-metrics | |||
app.kubernetes.io/version: v1.8.0-rc.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.
Should not all be v1.8.0-rc.1
?
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.
It's whatever is in the VERSION
file
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.
Not true, in the file above its v1.8.0-rc.1.
@@ -1,53 +1,58 @@ | |||
apiVersion: apps/v1 | |||
kind: StatefulSet | |||
metadata: | |||
labels: | |||
app.kubernetes.io/name: kube-state-metrics | |||
app.kubernetes.io/version: v1.8.0-rc.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.
v1.8.0-rc.1?
"name": "kube-state-metrics", | ||
"source": { | ||
"local": { | ||
"directory": "../jsonnet/kube-state-metrics" |
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.
Where is this directory? 🤔
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.
/jsonnet
is in the root of the repo
"directory": "../jsonnet/kube-state-metrics" | ||
} | ||
}, | ||
"version": "" |
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.
Should we pin this to master?
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.
it's a directory based package so it will always do whatever is currently in the directory
f811c00
to
8754347
Compare
Added a note to the release doc, and I believe I addressed all comments, if you have a suggestion for the name of the "standard" deployment, then I'm happy to adapt it. |
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.
When I run make examples
I get some files leftover which should not be generated IMO:
examples/autosharding/cluster-LRole-LBinding.yaml
examples/autosharding/cluster-LRole.yaml
examples/autosharding/role-LBinding.yaml
examples/autosharding/service-LAccount.yaml
examples/standard/cluster-LRole-LBinding.yaml
examples/standard/cluster-LRole.yaml
examples/standard/service-LAccount.yaml
kustomization.yaml
Outdated
- kubernetes/kube-state-metrics-deployment.yaml | ||
- kubernetes/kube-state-metrics-service-account.yaml | ||
- kubernetes/kube-state-metrics-service.yaml | ||
- kubernetes/cluster-role-binding.yaml |
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.
Should this be examples?
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.
good catch, forgot about this one
tests/e2e.sh
Outdated
|
||
trap finish EXIT | ||
|
||
# set up kube-state-metrics manifests | ||
kubectl create -f ./kubernetes/kube-state-metrics-service-account.yaml | ||
kubectl create -f ./kubernetes/standard/service-account.yaml |
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 should be examples now here as well.
1734188
to
84202ec
Compare
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 works and looks good to me. Will let @tariq1890 do a final 👍
Sharding and autosharding introduced a number of manifests that are very similar, but not identical to the standard manifests. This introduces generating all manifests using jsonnet and moves them to the explicit `/examples` directory.
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.
/lgtm
Thanks @brancz
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kube-state-metrics | ||
app.kubernetes.io/version: v1.8.0-rc.1 |
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.
Thoughts on adding this? Since these are best practices labels, it would be nice to add this to set a good example for others.
app.kubernetes.io/version: v1.8.0-rc.1 | |
app.kubernetes.io/version: v1.8.0-rc.1 | |
app.kubernetes.io/component: monitoring |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brancz, tariq1890 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
Sharding and autosharding introduced a number of manifests that are
very similar, but not identical to the standard manifests. This
introduces generating all manifests using jsonnet and moves them to
the explicit
/examples
directory.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #903