-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
prepare
package for external use
- Loading branch information
Showing
15 changed files
with
671 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kube-dns | ||
namespace: kube-system | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: titi | ||
image: titi/toto:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: notaprovider | ||
namespace: kube-system | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: titi | ||
image: titi/toto:latest |
13 changes: 13 additions & 0 deletions
13
pkg/prepare/fixtures/checkdnsprovider_supported_version.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: coredns | ||
namespace: kube-system | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: coredns | ||
image: image-registry.canonical.com:5000/cdk/coredns/coredns-amd64:1.6.9 | ||
- name: titi | ||
image: titi/toto:latest |
13 changes: 13 additions & 0 deletions
13
pkg/prepare/fixtures/checkdnsprovider_unsupported_version.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: coredns | ||
namespace: kube-system | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: coredns | ||
image: coredns-amd64:0.4.2 | ||
- name: titi | ||
image: titi/toto:latest |
64 changes: 64 additions & 0 deletions
64
pkg/prepare/fixtures/configurecoredns_already_patched.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: coredns | ||
namespace: kube-system | ||
spec: | ||
template: | ||
spec: | ||
volumes: | ||
- configMap: | ||
name: "other-cfgmap" | ||
- configMap: | ||
name: "coredns-cfgmap" | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: other-cfgmap | ||
namespace: kube-system | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: coredns-cfgmap | ||
namespace: kube-system | ||
labels: | ||
maesh-patched: "true" | ||
data: | ||
Corefile: | | ||
.:53 { | ||
errors | ||
health { | ||
lameduck 5s | ||
} | ||
ready | ||
kubernetes {{ pillar['dns_domain'] }} in-addr.arpa ip6.arpa { | ||
pods insecure | ||
fallthrough in-addr.arpa ip6.arpa | ||
ttl 30 | ||
} | ||
prometheus :9153 | ||
forward . /etc/resolv.conf | ||
cache 30 | ||
loop | ||
reload | ||
loadbalance | ||
} | ||
maesh:53 { | ||
errors | ||
rewrite continue { | ||
name regex ([a-zA-Z0-9-_]*)\.([a-zv0-9-_]*)\.maesh toto-{1}-6d61657368-{2}.toto.svc.titi | ||
answer name toto-([a-zA-Z0-9-_]*)-6d61657368-([a-zA-Z0-9-_]*)\.toto\.svc\.titi {1}.{2}.maesh | ||
} | ||
kubernetes titi in-addr.arpa ip6.arpa { | ||
pods insecure | ||
upstream | ||
fallthrough in-addr.arpa ip6.arpa | ||
} | ||
forward . /etc/resolv.conf | ||
cache 30 | ||
loop | ||
reload | ||
loadbalance | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: coredns | ||
namespace: kube-system |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: coredns | ||
namespace: kube-system | ||
spec: | ||
template: | ||
spec: | ||
volumes: | ||
- configMap: | ||
name: "other-cfgmap" | ||
- configMap: | ||
name: "coredns-cfgmap" | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: other-cfgmap | ||
namespace: kube-system | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: coredns-cfgmap | ||
namespace: kube-system | ||
data: | ||
Corefile: | | ||
.:53 { | ||
errors | ||
health { | ||
lameduck 5s | ||
} | ||
ready | ||
kubernetes {{ pillar['dns_domain'] }} in-addr.arpa ip6.arpa { | ||
pods insecure | ||
fallthrough in-addr.arpa ip6.arpa | ||
ttl 30 | ||
} | ||
prometheus :9153 | ||
forward . /etc/resolv.conf | ||
cache 30 | ||
loop | ||
reload | ||
loadbalance | ||
} |
27 changes: 27 additions & 0 deletions
27
pkg/prepare/fixtures/configurekubedns_already_patched.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kube-dns | ||
namespace: kube-system | ||
spec: | ||
template: | ||
spec: | ||
volumes: | ||
- configMap: | ||
name: "kubedns-cfgmap" | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: kubedns-cfgmap | ||
namespace: kube-system | ||
labels: | ||
maesh-patched: "true" | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: coredns | ||
namespace: maesh | ||
spec: | ||
clusterIP: "1.2.3.4" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kube-dns | ||
namespace: kube-system | ||
spec: | ||
template: | ||
spec: | ||
volumes: | ||
- configMap: | ||
name: "kubedns-cfgmap" | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: kubedns-cfgmap | ||
namespace: kube-system | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: coredns | ||
namespace: maesh | ||
spec: | ||
clusterIP: "1.2.3.4" |
Oops, something went wrong.