fs.Var(&s.PortalNet,"portal-net","A CIDR notation IP range from which to assign portal IPs. This must not overlap with any IP ranges assigned to nodes for pods.")
fs.StringVar(&s.MasterServiceNamespace,"master-service-namespace",s.MasterServiceNamespace,"The namespace from which the kubernetes master services should be injected into pods")
fs.Var(&s.RuntimeConfig,"runtime-config","A set of key=value pairs that describe runtime configuration that may be passed to the apiserver.")
fs.Var(&s.RuntimeConfig,"runtime-config","A set of key=value pairs that describe runtime configuration that may be passed to the apiserver. api/<version> key can be used to turn on/off specific api versions. api/all and api/legacy are special keys to control all and legacy api versions respectively.")
@@ -10,18 +10,20 @@ The `cluster/kube-push.sh` script will do a rudimentary update; it is a 1.0 road
There is a sequence of steps to upgrade to a new API version.
1. Turn on the new version.
1. Turn on the new api version
2. Upgrade the cluster's storage to use the new version.
3. Upgrade all config files. Identify users of the old api version endpoints.
4. Update existing objects in the storage to new version by running cluster/update-storage-objects.sh
3. Turn off the old version.
### Turn on or off an API version for your cluster
TODO: There's an apiserver flag for this.
Specific API versions can be turned on or off by passing --runtime-config=api/<version> flag while bringing up the server. For example: to turn off v1beta3 API, pass --runtime-config=api/v1beta3=false.
runtime-config also supports 2 special keys: api/all and api/legacy to control all and legacy APIs respectively. For example, for turning off all api versions except v1beta3, pass --runtime-config=api/all=false,api/v1beta3=true.
### Switching your cluster's storage API version
TODO: This functionality hasn't been written yet.
KUBE_API_VERSIONS env var controls the API versions that are supported in the cluster. The first version in the list is used as the cluster's storage version. Hence, to set a specific version as the storage version, bring it to the front of list of versions in the value of KUBE_API_VERSIONS.
### Switching your config files to a new API version
glog.Fatalf("invalid api version: %s in KUBE_API_VERSIONS: %s. List of valid API versions: %s",version,os.Getenv("KUBE_API_VERSIONS"),strings.Join(validAPIVersions,", "))
}
Versions=append(Versions,versions[i])
}
...
...
@@ -195,3 +144,36 @@ func init() {
}
RESTMapper=mapper
}
// InterfacesFor returns the default Codec and ResourceVersioner for a given version
// string, or an error if the version is not known.