-
Notifications
You must be signed in to change notification settings - Fork 262
Conversation
Codecov Report
@@ Coverage Diff @@
## master #551 +/- ##
=======================================
Coverage 56.66% 56.66%
=======================================
Files 57 57
Lines 3969 3969
=======================================
Hits 2249 2249
Misses 1432 1432
Partials 288 288 Continue to review full report at Codecov.
|
examples/flavor/kubernetes/README.md
Outdated
@@ -0,0 +1,120 @@ | |||
InfraKit Flavor Plugin - Swarm |
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.
Title...
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.
OMG! 😱
I will fix immediately.
Please sign your commits following these rules: $ git clone -b "k8s" [email protected]:YujiOshima/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842353535280
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
examples/flavor/kubernetes/flavor.go
Outdated
var pfPath string | ||
switch c.flavorSpec.KubeNWAddOn { | ||
case "flannel": | ||
pfPath = "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml" |
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 wonder if we can move these hard coded strings to the flavor's Properties
so that we can specify something like
"KubeNWAddOn" : {
"Name" : "calico",
"Path" : "http://docs.projectcalico.org/v2.2/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yaml"
}
This will allow us to avoid hard coding, and all the configurations can be inside the same JSON which makes it easy to see how system is configured.
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.
OK! That's sounds good!
I would like to make it a property of the kubernetes addon without limiting to network add-ons.
"KubeAddOn" : {
"Name" : "calico",
"Type" : "network",
"Path" : "http://docs.projectcalico.org/v2.2/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yaml"
}
If you do not set network add-on only, cluster does not become ready status, so if you do not set network add-on, I will display a warning.
examples/flavor/kubernetes/flavor.go
Outdated
{ | ||
Name: "NETWORK_ADDON", | ||
Description: []string{"Returns the kube network addon"}, | ||
Func: func() (interface{}, error) { |
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.
How about making this a function that takes the addon type as a parameter? Then we can name the function ADDON
and its signature is func(addonType string) (interface{}, error)
and we only need to search the list of addons and return the path of the first one with the matching type.
examples/flavor/kubernetes/flavor.go
Outdated
}, | ||
}, | ||
{ | ||
Name: "VISUALISE_ADDON", |
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.
See comment above... if the function above takes a parameter then we won't need this function here.
@YujiOshima - sorry a small comment / change to consider before we merge. Also can you sign the commits... |
Signed-off-by: YujiOshima <[email protected]>
Signed-off-by: YujiOshima <[email protected]>
Signed-off-by: YujiOshima <[email protected]>
@chungers Thank you for the review! I updated it and cleaned up commits. I rebased with latest master. PTAL |
Signed-off-by: YujiOshima <[email protected]>
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 is great. I am so excited! Thank you!
To support Kubernetes.
This flavor based on kubeadm.
Limitation (Next step)
Signed-off-by: YujiOshima [email protected]