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

Configurable images #91

Merged
merged 1 commit into from
Dec 5, 2017
Merged

Conversation

moelsayed
Copy link
Contributor

#84

@moelsayed moelsayed force-pushed the configurable_images branch 2 times, most recently from cb7f68a to 7a605c3 Compare December 2, 2017 08:13
@moelsayed moelsayed changed the title Configurable images [wip] Configurable images Dec 2, 2017
@moelsayed moelsayed force-pushed the configurable_images branch 2 times, most recently from a25df8b to b3274d2 Compare December 3, 2017 11:55
@moelsayed moelsayed changed the title [wip] Configurable images Configurable images Dec 3, 2017
@moelsayed moelsayed force-pushed the configurable_images branch 2 times, most recently from 2532e03 to 2a8ddc6 Compare December 3, 2017 22:17
cluster.yml Outdated
@@ -49,6 +51,16 @@ services:
kubeproxy:
image: rancher/k8s:v1.8.3-rancher2


rke_images:

Choose a reason for hiding this comment

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

lets call it system_images, rke is a bit redundant

@@ -17,7 +17,7 @@ spec:
spec:
containers:
- name: autoscaler
image: gcr.io/google_containers/cluster-proportional-autoscaler-amd64:1.0.0
image: ` + kubeDNSConfig["autoscaler_image"] + `

Choose a reason for hiding this comment

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

We should define images names as constants. To avoid repeating them in the code

// don't break if the user didn't define rke_images
c.RKEImages = make(map[string]string)
}
setDefaultIfEmptyMapValue(c.RKEImages, "alpine", DefaultAplineImage)

Choose a reason for hiding this comment

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

Consider doing it in some kind of a loop, there is a lot of repeatable stuff. When you read the config, you can put all images in a map, then iterate over this map

@moelsayed moelsayed force-pushed the configurable_images branch 6 times, most recently from b14d732 to 27308dc Compare December 5, 2017 01:43
 Refactor configuration defaults
 Add comments to config
 Add configurable utility images
 Add configurable network plugin images
 Add configurable kubedns images
@moelsayed moelsayed force-pushed the configurable_images branch from 27308dc to 0ee002b Compare December 5, 2017 18:35
Copy link
Contributor

@galal-hussein galal-hussein left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@galal-hussein galal-hussein merged commit 712b051 into rancher:master Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants