-
Notifications
You must be signed in to change notification settings - Fork 839
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
Set Up Publishing-Bot #520
Conversation
@ameukam can you also add |
/lgtm |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
and releases >= v1.14, we run two instances of the bot today. | ||
|
||
The instance of the bot responsible for syncing releases <= v1.14 runs in the | ||
`k8s-publishing-bot-godeps` namespace and the instance of the bot responsible |
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 NS does not exist yet - should this PR add it to infra/gcp/namespaces/ensure-namespaces.sh
?
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: publisher-config |
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.
Would it make sense to have 2 subdirs, "kubernetes" and "kubernetes-nightly" to isolate the files better? would make diffing them easier, too
port: 80 | ||
resources: | ||
requests: | ||
cpu: 300m |
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.
why is CPU hardcoded but memory is parameterized?
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.
also, .3 cores is a LOT of CPU
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 have client-go smoke tests in there, which require a certain amount of CPU in order to be stable.
cpu: 300m | ||
memory: MEMORY_REQUESTS | ||
limits: | ||
cpu: 2 |
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.
don't set CPU limits. There's no point to it.
@@ -0,0 +1,15 @@ | |||
apiVersion: apps/v1 | |||
kind: Replicaset |
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.
Why is this not using Deployment?
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.
@nikhita asked to keep it as Replicaset in a previous conversation: #520 (comment)
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.
I don't see why this is needed, though. Is it JUSt to avoid changing 2 things at once?
@@ -0,0 +1,7 @@ | |||
kind: StorageClass |
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 go ... somewhere else. Probably in clusters/kubernetes-public/aaa
- see https://www.terraform.io/docs/providers/kubernetes/r/storage_class.html
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 could be a PR of its own
|
||
SHELL := /bin/bash | ||
|
||
build: |
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 doesn't seem to apply at all in this directory? The code is not here
.PHONY: validate | ||
|
||
init-deploy: validate | ||
$(KUBECTL) delete -n "$(NAMESPACE)" --ignore-not-found=true replicaset publisher |
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 feels a little baroque - why are we trying to delete things?
{ cat manifests/pod.yaml && sed 's/^/ /' manifests/podspec.yaml; } | \ | ||
$(call prepare_spec) | $(KUBECTL) apply -n "$(NAMESPACE)" -f - | ||
|
||
deploy: init-deploy |
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.
Document assumptions - like the current context
$(KUBECTL) apply -n "$(NAMESPACE)" -f manifests/service.yaml | ||
{ cat manifests/rs.yaml && sed 's/^/ /' manifests/podspec.yaml; } | \ | ||
$(call prepare_spec) | sed 's/-interval=0/-interval=$(INTERVAL)/g' | \ | ||
$(KUBECTL) apply -n "$(NAMESPACE)" -f - |
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.
why are we duplicating deployment code from the publishing bot? 😱 This repo is invisible to anybody doing changes in the bot repository, which will eventually break this copy.
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.
With the migration of the publishing bot to a new community-owned GKE cluster (aaa
), we want to migrate some parts of the deployment code. What's the right approach in this scenario ?
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 code in the bot repo is used by a number of parties. So we won't remove it. Hence, you are creating a copy here which will most certainly divert.
Where is the problem of keeping the deployment code where it is? The people deploying the publishing bot (which is @nikhita, @dims and myself only; nobody without deep knowledge of what the bot does should do this) all are used to the bot repo. Which pain points should this duplication solve?
I would also be fine to do some git clone magic here checking out the bot repo and call the Makefile in there. Then it's well documented what is going on.
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.
I am fine to leave the config in the bot repo, I guess. This repo/dir could be reduced to a README explaining how we deploy it in "aaa"
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.
But all my comments here apply - especially around CPu and memory limits.
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.
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.
@sttts @thockin @ameukam @nikhita I have added to todays agenda for k8s-infra-wg bi-weekly meeting discussion about this topic. Please attend if you want to discuss about it in syncronous manner. http://bit.ly/wg-k8s-infra-notes
@bartsmykla I'm going to work on it this week. |
@ameukam perfect! If you'll need any help just ping me on slack :-) |
@ameukam is there anything I can help you with to move this forward? :-) |
/hold Just to be sure it is not merged accidently until the comments are addresses that we don't want to duplicate build code for the bot. |
@bartsmykla kubernetes/publishing-bot#221 got merged. I think this PR is not useful anymore. I will close this PR when publishing-bot will be migrated. |
@nikhita: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Huge thanks for @ameukam from me too! |
And to you @nikhita too! :-) |
Part of #503.
Configs and deployments files are from Publishing-Bot repo.
/assign @dims @nikhita