Skip to content
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.

issue 283: fix freeze 'master: SSH auth method: private key', fix 'sy… #284

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# in CoreOS, so tell Vagrant that so it can be smarter.
v.check_guest_additions = false
v.functional_vboxsf = false
v.customize ["modifyvm", :id, "--paravirtprovider", "minimal"] # fix freeze "vagrant up" on master: SSH auth method: private key
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is now in master, so please remove it.

end
config.vm.provider :parallels do |p|
p.update_guest_tools = false
Expand Down Expand Up @@ -270,7 +271,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
f.write(dnsData)
end
else if DNS_PROVIDER == "coredns"
system "#{__dir__}/plugins/dns/coredns/deploy.sh 10.100.0.10/24 #{DNS_DOMAIN} #{__dir__}/plugins/dns/coredns/coredns.yaml.sed > #{__dir__}/temp/coredns-deployment.yaml"
system "cp #{__dir__}/plugins/dns/coredns/coredns-deployment.yaml #{__dir__}/temp/coredns-deployment.yaml" # copying a manually compiled file
# don't work, why??
#system "#{__dir__}/plugins/dns/coredns/deploy.sh 10.100.0.10/24 #{DNS_DOMAIN} #{__dir__}/plugins/dns/coredns/coredns.yaml.sed > #{__dir__}/temp/coredns-deployment.yaml"
Copy link
Owner

Choose a reason for hiding this comment

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

Please, explain this.

end
end
end
Expand Down Expand Up @@ -485,6 +488,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
kHost.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--uart1", "0x3F8", "4"]
vb.customize ["modifyvm", :id, "--uartmode1", serialFile]
vb.customize ["modifyvm", :id, "--paravirtprovider", "minimal"]
end
# supported since vagrant-parallels 1.3.7
# https://github.com/Parallels/vagrant-parallels/issues/164
Expand Down
159 changes: 159 additions & 0 deletions plugins/dns/coredns/coredns-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: coredns
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
# ---
# apiVersion: rbac.authorization.k8s.io/v1
# kind: ClusterRole
# metadata:
# labels:
# kubernetes.io/bootstrapping: rbac-defaults
# addonmanager.kubernetes.io/mode: Reconcile
# name: system:coredns
# rules:
# - apiGroups:
# - ""
# resources:
# - endpoints
# - services
# - pods
# - namespaces
# verbs:
# - list
# - watch
# ---
# apiVersion: rbac.authorization.k8s.io/v1
# kind: ClusterRoleBinding
# metadata:
# annotations:
# rbac.authorization.kubernetes.io/autoupdate: "true"
# labels:
# kubernetes.io/bootstrapping: rbac-defaults
# addonmanager.kubernetes.io/mode: EnsureExists
# name: system:coredns
# roleRef:
# apiGroup: rbac.authorization.k8s.io
# kind: ClusterRole
# name: system:coredns
# subjects:
# - kind: ServiceAccount
# name: coredns
# namespace: kube-system
---
Copy link
Owner

Choose a reason for hiding this comment

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

Disabling RBAC objects doesn't seem right. Why did you do this?

apiVersion: v1
kind: ConfigMap
metadata:
name: coredns
namespace: kube-system
labels:
addonmanager.kubernetes.io/mode: EnsureExists
data:
Corefile: |
.:53 {
errors
log
health
kubernetes cluster.local 10.100.0.10/24 {
pods insecure
}
prometheus
proxy . /etc/resolv.conf
cache 30
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: coredns
namespace: kube-system
labels:
k8s-app: coredns
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
kubernetes.io/name: "CoreDNS"
spec:
replicas: 1
selector:
matchLabels:
k8s-app: coredns
template:
metadata:
labels:
k8s-app: coredns
spec:
serviceAccountName: coredns
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
- key: "CriticalAddonsOnly"
operator: "Exists"
containers:
- name: coredns
image: coredns/coredns:1.0.2
imagePullPolicy: IfNotPresent
resources:
limits:
memory: 170Mi
requests:
cpu: 100m
memory: 70Mi
args: [ "-conf", "/etc/coredns/Corefile" ]
volumeMounts:
- name: config-volume
mountPath: /etc/coredns
ports:
- containerPort: 53
name: dns
protocol: UDP
- containerPort: 53
name: dns-tcp
protocol: TCP
- containerPort: 9153
name: metrics
protocol: TCP
livenessProbe:
httpGet:
path: /health
port: 8080
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5
dnsPolicy: Default
volumes:
- name: config-volume
configMap:
name: coredns
items:
- key: Corefile
path: Corefile
---
apiVersion: v1
kind: Service
metadata:
name: coredns
namespace: kube-system
labels:
k8s-app: coredns
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
kubernetes.io/name: "CoreDNS"
spec:
selector:
k8s-app: coredns
clusterIP: 10.100.0.10
ports:
- name: dns
port: 53
protocol: UDP
- name: dns-tcp
port: 53
protocol: TCP
- name: metrics
port: 9153
protocol: TCP