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

Allow for some coredns customization #5839

Closed
wants to merge 4 commits into from

Conversation

Globegitter
Copy link
Contributor

@Globegitter Globegitter commented Sep 26, 2018

I wanted to be able to enable autopath config and thought I would also try and fix #5773 along the way and add a few other minor changes. Imo the update strategy of kube-dns made more sense to have maxUnavailable set to 0. What do you think?

I also haven't tested the cache setting, but I think by having it a string, the full control should be possible including the extended config

cache [TTL] [ZONES...] {
    success CAPACITY [TTL]
    denial CAPACITY [TTL]
    prefetch AMOUNT [[DURATION] [PERCENTAGE%]]
}

by just using a yaml multi-line string.

This is the first PR of this nature that I have done btw, so hope modified everything at the right place.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 26, 2018
@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 26, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Globegitter
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: kashifsaadat

If they are not already assigned, you can assign the PR to them by writing /assign @kashifsaadat in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Globegitter Globegitter changed the title coredns config Allow for some coredns customization Sep 26, 2018
@rajansandeep
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 26, 2018
@Globegitter
Copy link
Contributor Author

Or as another idea, could we possibly just have KubeDNS.Corefile as a string and allow the whole corefile to be overwritten? That way everything could be customized and that should also allow for #5685 and any other cases that might come up in the future.

@@ -62,10 +62,13 @@ data:
upstream
fallthrough in-addr.arpa ip6.arpa
}
{{ if KubeDNS.Corefile.EnableAutopath -}}
autpath @kubernetes
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a typo? autpath -> autopath?

@@ -84,7 +87,8 @@ spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 10%
maxUnavailable: 0
Copy link
Contributor

Choose a reason for hiding this comment

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

I've been investigating some DNS issues related to cluster rolling-updates, this seems related.

thank you

@rochacon
Copy link
Contributor

rochacon commented Oct 4, 2018

@Globegitter I like your idea of being able to replace the entire Corefile, so any customization is possible. I'm currently interested in disabling DNS resolution logs.
However I'm a bit confused regarding the current implementation and how the cluster spec yaml would look like with the current approach.

In my understanding the new spec key in the cluster spec yaml should replace the entire content of the Corefile Configmap and the use would be like this:

# cluster.spec.yaml
apiVersion: kops/v1alpha2
kind: Cluster
metadata:
  name: my-cluster
spec:
  kubeDNS:
    provider: CoreDNS
  coreDNS:
    version: 1.2.2
    Corefile: |
      . {
        whoami
      }

The current implementation have keys to autopath (specific feature) and version (this is nice and I've incorporated in the example above, a bit differently).

Could you provide some examples on how you think the cluster spec should be? What are your thoughts on the approach described above?

Thank you for contributing this!

@Globegitter
Copy link
Contributor Author

@rochacon Sorry I have been away on holiday and not sure I left it in a completely working state beforehand. I'll get back to it in the coming day. But yes your example is how it should be working.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 28, 2018
@k8s-ci-robot
Copy link
Contributor

@Globegitter: PR needs rebase.

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.

@justinsb
Copy link
Member

Looks like a rebase is needed.

The other challenge is that some of these are CoreDNS specific, but we're in the generic kubedns configuration file. It's not terrible, but it makes me a little uneasy.

So I'm hoping that we're going to have a better way to manage addons in general in kops 1.12 / 1.13 - based around channels and kustomize, so we might be able to get this functionality without having to plumb everything through the API :-)

Moving to the next milestone anyway, as we're in the final burndown for 1.11

/milestone 1.12

@justinsb justinsb added this to the 1.12 milestone Nov 19, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 17, 2019
@justinsb
Copy link
Member

Thanks again for this @Globegitter

We discussed in office-hours today the need to prioritize bug fixes until we can get 1.12 out (which will hopefully mean we get to everything faster overall), and I believe this is a feature, so I'm going to move this to the next release.

/kind feature
/milestone 1.13

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 18, 2019
@justinsb justinsb modified the milestones: 1.12, 1.13 Mar 18, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Apr 17, 2019
@gerricchaplin
Copy link

/remove-lifecycle rotten

@Pajk
Copy link

Pajk commented May 20, 2019

FYI the current CoreDNS version (1.3.1) used by Kops has a bug causing the CoreDNS failure when the kubernetes api is down. The option to change the CoreDNS version would be really helpful.

coredns/coredns#2629

There's a workaround - mount an EmptyDir to /tmp.

kubernetes/kubernetes#75414 (comment)

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 18, 2019
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 18, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 17, 2019
@Globegitter
Copy link
Contributor Author

Sorry, for not responding, I will not have time for this anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/addon-manager cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CoreDNS cache specification
8 participants