Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3671047632b9
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 279716c33070
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 9, 2019

  1. nixos/kubernetes: add dns addonmanger reconcile mode option (#55834)

    Allow coredns ConfigMap and Depolyment to be editable by the user. An use
    case is augmenting the default, generated dns records with local services.
    juselius authored and danbst committed Mar 9, 2019
    Copy the full SHA
    279716c View commit details
Showing with 14 additions and 2 deletions.
  1. +14 −2 nixos/modules/services/cluster/kubernetes/addons/dns.nix
16 changes: 14 additions & 2 deletions nixos/modules/services/cluster/kubernetes/addons/dns.nix
Original file line number Diff line number Diff line change
@@ -38,6 +38,18 @@ in {
type = types.int;
};

reconcileMode = mkOption {
description = ''
Controls the addon manager reconciliation mode for the DNS addon.
Setting reconcile mode to EnsureExists makes it possible to tailor DNS behavior by editing the coredns ConfigMap.
See: <link xlink:href="https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/addon-manager/README.md"/>.
'';
default = "Reconcile";
type = types.enum [ "Reconcile" "EnsureExists" ];
};

coredns = mkOption {
description = "Docker image to seed for the CoreDNS container.";
type = types.attrs;
@@ -131,7 +143,7 @@ in {
kind = "ConfigMap";
metadata = {
labels = {
"addonmanager.kubernetes.io/mode" = "Reconcile";
"addonmanager.kubernetes.io/mode" = cfg.reconcileMode;
"k8s-app" = "kube-dns";
"kubernetes.io/cluster-service" = "true";
};
@@ -162,7 +174,7 @@ in {
kind = "Deployment";
metadata = {
labels = {
"addonmanager.kubernetes.io/mode" = "Reconcile";
"addonmanager.kubernetes.io/mode" = cfg.reconcileMode;
"k8s-app" = "kube-dns";
"kubernetes.io/cluster-service" = "true";
"kubernetes.io/name" = "CoreDNS";