jiebi/CodeConvo huggingface dataset:
DESC="The etcd key-value share configuration service" NAME=etcd DAEMON=/usr/local/bin/$NAME <del> DAEMON_ARGS="-peer-addr $HOSTNAME:7001 -name $HOSTNAME" </del> <ins> # DAEMON_ARGS="-peer-addr $HOSTNAME:7001 -name $HOSTNAME" host_ip=$(hostname -i) DAEMON_ARGS="-addr ${host_ip}:4001 -bind-addr ${host_ip}:4001 -data-dir /var/etcd -initial-advertise-peer-urls http://${HOSTNAME}:2380 -name ${HOSTNAME} -initial-cluster ${HOSTNAME}=http://${HOSTNAME}:2380" </ins> DAEMON_LOG_FILE=/var/log/$NAME.log PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME
exit 1 fi <ins> version=$(etcd -version | cut -d " " -f 3) if [[ "${version}" < "2.0.0" ]]; then kube::log::usage "etcd version 2.0.0 or greater required." exit 1 fi </ins> # Start etcd ETCD_DIR=$(mktemp -d -t test-etcd.XXXXXX) <del> etcd -name test -data-dir ${ETCD_DIR} -addr ${host}:${port} >/dev/null 2>/dev/null & </del> <ins> kube::log::usage "etcd -data-dir ${ETCD_DIR} -addr ${host}:${port} >/dev/null 2>/dev/null" etcd -data-dir ${ETCD_DIR} -addr ${host}:${port} >/dev/null 2>/dev/null & </ins> ETCD_PID=$! <del> kube::util::wait_for_url "http://${host}:${port}/v2/keys/" "etcd: " </del> <ins> echo "Waiting for etcd to come up." while true; do if curl -L http://127.0.0.1:4001/v2/keys/test -XPUT -d value="test"; then break fi done kube::util::wait_for_url "http://${host}:${port}/v2/keys/test" "etcd: " </ins> } kube::etcd::cleanup() {
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. <del> ETCD_VERSION=${ETCD_VERSION:-v0.4.6} </del> <ins> ETCD_VERSION=${ETCD_VERSION:-v2.0.0} </ins> cd "${KUBE_ROOT}/third_party" curl -sL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz
dns_replicas: '$(echo "$DNS_REPLICAS" | sed -e "s/'/''/g")' dns_server: '$(echo "$DNS_SERVER_IP" | sed -e "s/'/''/g")' dns_domain: '$(echo "$DNS_DOMAIN" | sed -e "s/'/''/g")' <ins> instance_prefix: '$(echo "$INSTANCE_PREFIX" | sed -e "s/'/''/g")' </ins> EOF # Configure the salt-master
#   KUBE_PASSWORD function get-password { # go template to extract the auth-path of the current-context user <del> local template='{{$ctx := index . "current-context"}}{{$user := index . "contexts" $ctx "user"}}{{index . "users" $user "auth-path"}}' </del> <ins> local template='{{with $ctx := index . "current-context"}}{{$user := index . "contexts" $ctx "user"}}{{index . "users" $user "auth-path"}}{{end}}' </ins> local file=$("${KUBE_ROOT}/cluster/kubectl.sh" config view -o template --template="${template}") <del> if [[ -r "$file" ]]; then </del> <ins> if [[ ! -z "$file" && -r "$file" ]]; then </ins> KUBE_USER=$(cat "$file" | python -c 'import json,sys;print json.load(sys.stdin)["User"]') KUBE_PASSWORD=$(cat "$file" | python -c 'import json,sys;print json.load(sys.stdin)["Password"]') return
// PodSpec is a description of a pod type PodSpec struct { <del> Volumes       []Volume      `json:"volumes"` </del> <ins> Volumes []Volume `json:"volumes"` // Required: there must be at least one container in a pod. </ins> Containers    []Container   `json:"containers"` RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"` // Required: Set DNS policy.
// PodSpec is a description of a pod type PodSpec struct { <del> Volumes       []Volume      `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"` Containers    []Container   `json:"containers" description:"list of containers belonging to the pod; containers cannot currently be added or removed"` </del> <ins> Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"` // Required: there must be at least one container in a pod. Containers    []Container   `json:"containers" description:"list of containers belonging to the pod; containers cannot currently be added or removed; there must be at least one container in a Pod"` </ins> RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" description:"restart policy for all containers within the pod; one of RestartPolicyAlways, RestartPolicyOnFailure, RestartPolicyNever"` // Optional: Set DNS policy.  Defaults to "ClusterFirst" DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" description:"DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"`
// PodSpec is a description of a pod type PodSpec struct { <del> Volumes       []Volume      `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"` Containers    []Container   `json:"containers" description:"list of containers belonging to the pod; cannot be updated; containers cannot currently be added or removed"` </del> <ins> Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"` // Required: there must be at least one container in a pod. Containers    []Container   `json:"containers" description:"list of containers belonging to the pod; cannot be updated; containers cannot currently be added or removed; there must be at least one container in a Pod"` </ins> RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" description:"restart policy for all containers within the pod; one of RestartPolicyAlways, RestartPolicyOnFailure, RestartPolicyNever"` // Optional: Set DNS policy.  Defaults to "ClusterFirst" DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" description:"DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"`
case "name": return "name", value, nil case "DesiredState.Host": <del> return "Status.Host", value, nil </del> <ins> return "status.host", value, nil </ins> case "DesiredState.Status": podStatus := PodStatus(value) var internalValue newer.PodPhase newer.Scheme.Convert(&podStatus, &internalValue) <del> return "Status.Phase", string(internalValue), nil </del> <ins> return "status.phase", string(internalValue), nil </ins> default: return "", "", fmt.Errorf("field label not supported: %s", label) }
label:       "label=qux", expectedIDs: util.NewStringSet("qux"), }, { <del> field:       "Status.Phase=Failed", </del> <ins> field:       "status.phase=Failed", </ins> expectedIDs: util.NewStringSet("baz"), }, { <del> field:       "Status.Host=barhost", </del> <ins> field:       "status.host=barhost", </ins> expectedIDs: util.NewStringSet("bar"), }, { <del> field:       "Status.Host=", </del> <ins> field:       "status.host=", </ins> expectedIDs: util.NewStringSet("foo", "baz", "qux", "zot"), }, { <del> field:       "Status.Host!=", </del> <ins> field:       "status.host!=", </ins> expectedIDs: util.NewStringSet("bar"), }, }
path /var/lib/docker/containers/*/*-json.log pos_file /var/lib/docker/containers/containers.log.pos time_format %Y-%m-%dT%H:%M:%S <del> tag docker.container.* </del> <ins> tag docker.* read_from_head true </ins> </source> <del> <match docker.container.**> </del> <ins> <match docker.**> </ins> type google_cloud flush_interval 5s # Never wait longer than 5 minutes between retries.
}() }, 240.0) <ins> It("should be able to create a functioning external load balancer", func() { serviceName := "external-lb-test" ns := api.NamespaceDefault labels := map[string]string{ "key0": "value0", } service := &api.Service{ ObjectMeta: api.ObjectMeta{ Name: serviceName, }, Spec: api.ServiceSpec{ Port:                       80, Selector:                   labels, TargetPort:                 util.NewIntOrStringFromInt(80), CreateExternalLoadBalancer: true, }, } By("cleaning up previous service " + serviceName + " from namespace " + ns) c.Services(ns).Delete(serviceName) By("creating service " + serviceName + " with external load balancer in namespace " + ns) result, err := c.Services(ns).Create(service) Expect(err).NotTo(HaveOccurred()) defer func(ns, serviceName string) { // clean up when we're done By("deleting service " + serviceName + " in namespace " + ns) err := c.Services(ns).Delete(serviceName) Expect(err).NotTo(HaveOccurred()) }(ns, serviceName) if len(result.Spec.PublicIPs) != 1 { Failf("got unexpected number (%d) of public IPs for externally load balanced service: %v", result.Spec.PublicIPs, result) } ip := result.Spec.PublicIPs[0] port := result.Spec.Port pod := &api.Pod{ TypeMeta: api.TypeMeta{ Kind:       "Pod", APIVersion: "v1beta1", }, ObjectMeta: api.ObjectMeta{ Name:   "elb-test-" + string(util.NewUUID()), Labels: labels, }, Spec: api.PodSpec{ Containers: []api.Container{ { Name:  "webserver", Image: "kubernetes/test-webserver", }, }, }, } By("creating pod to be part of service " + serviceName) podClient := c.Pods(api.NamespaceDefault) defer func() { By("deleting pod " + pod.Name) defer GinkgoRecover() podClient.Delete(pod.Name) }() if _, err := podClient.Create(pod); err != nil { Failf("Failed to create pod %s: %v", pod.Name, err) } expectNoError(waitForPodRunning(c, pod.Name)) By("hitting the pod through the service's external load balancer") var resp *http.Response for t := time.Now(); time.Since(t) < 4*time.Minute; time.Sleep(5 * time.Second) { resp, err = http.Get(fmt.Sprintf("http://%s:%d", ip, port)) if err == nil { break } } Expect(err).NotTo(HaveOccurred()) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) Expect(err).NotTo(HaveOccurred()) if resp.StatusCode != 200 { Failf("received non-success return status %q trying to access pod through load balancer; got body: %s", resp.Status, string(body)) } if !strings.Contains(string(body), "test-webserver") { Failf("received response body without expected substring 'test-webserver': %s", string(body)) } }) </ins> It("should correctly serve identically named services in different namespaces on different external IP addresses", func() { serviceNames := []string{"services-namespace-test0"} // Could add more here, but then it takes longer. namespaces := []string{"namespace0", "namespace1"}   // As above.
- user: root - group: root - mode: 644 <ins> /etc/monit/conf.d/kube-proxy: file: - managed - source: salt://monit/kube-proxy - user: root - group: root - mode: 644 </ins> {% endif %} monit-service: service: - running <del> - name: monit </del> <ins> - name: monit </ins> - watch: <del> - pkg: monit </del> <ins> - pkg: monit </ins> - file: /etc/monit/conf.d/* {% endif %}
// Start syncing or monitoring node status. if syncNodeStatus { go util.Forever(func() { <del> if err = nc.SyncProbedNodeStatus(); err != nil { </del> <ins> if err := nc.SyncProbedNodeStatus(); err != nil { </ins> glog.Errorf("Error syncing status: %v", err) } }, period) } else { go util.Forever(func() { <del> if err = nc.MonitorNodeStatus(); err != nil { </del> <ins> if err := nc.MonitorNodeStatus(); err != nil { </ins> glog.Errorf("Error monitoring node status: %v", err) } }, nodeMonitorPeriod)
}, { "ImportPath": "github.com/docker/spdystream", <del> "Rev": "e731c8f9f19ffd7e51a469a2de1580c1dfbb4fae" </del> <ins> "Rev": "99515db39d3dad9607e0293f18152f3d59da76dc" </ins> }, { "ImportPath": "github.com/elazarl/go-bindata-assetfs",
if timer != nil { timer.Stop() } <ins> // Start a goroutine to drain resetChan. This is needed because we've seen // some unit tests with large numbers of goroutines get into a situation // where resetChan fills up, at least 1 call to Write() is still trying to // send to resetChan, the connection gets closed, and this case statement // attempts to grab the write lock that Write() already has, causing a // deadlock. // // See https://github.com/docker/spdystream/issues/49 for more details. go func() { for _ = range resetChan { } }() </ins> i.writeLock.Lock() close(resetChan) i.resetChan = nil i.writeLock.Unlock() break Loop } }
client.BindClientConfigFlags(fs, &s.ClientConfig) fs.StringVar(&s.AlgorithmProvider, "algorithm_provider", s.AlgorithmProvider, "The scheduling algorithm provider to use") fs.StringVar(&s.PolicyConfigFile, "policy_config_file", s.PolicyConfigFile, "File with scheduler policy configuration") <del> fs.BoolVar(&s.EnableProfiling, "profiling", false, "Enable profiling via web interface host:port/debug/pprof/") </del> <ins> fs.BoolVar(&s.EnableProfiling, "profiling", true, "Enable profiling via web interface host:port/debug/pprof/") </ins> } // Run runs the specified SchedulerServer.  This should never exit.
} go func() { <ins> mux := http.NewServeMux() </ins> if s.EnableProfiling { <del> http.HandleFunc("/debug/pprof/", pprof.Index) http.HandleFunc("/debug/pprof/profile", pprof.Profile) http.HandleFunc("/debug/pprof/symbol", pprof.Symbol) </del> <ins> mux.HandleFunc("/debug/pprof/", pprof.Index) mux.HandleFunc("/debug/pprof/profile", pprof.Profile) mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol) </ins> } <del> http.Handle("/metrics", prometheus.Handler()) http.ListenAndServe(net.JoinHostPort(s.Address.String(), strconv.Itoa(s.Port)), nil) </del> <ins> mux.Handle("/metrics", prometheus.Handler()) server := &http.Server{ Addr:    net.JoinHostPort(s.Address.String(), strconv.Itoa(s.Port)), Handler: mux, } glog.Fatal(server.ListenAndServe()) </ins> }() configFactory := factory.NewConfigFactory(kubeClient)
allErrs := errs.ValidationErrorList{} allErrs = append(allErrs, ValidateObjectMetaUpdate(&oldNamespace.ObjectMeta, &newNamespace.ObjectMeta).Prefix("metadata")...) newNamespace.Spec = oldNamespace.Spec <ins> if newNamespace.DeletionTimestamp.IsZero() { if newNamespace.Status.Phase != api.NamespaceActive { allErrs = append(allErrs, errs.NewFieldInvalid("Status.Phase", newNamespace.Status.Phase, "A namespace may only be in active status if it does not have a deletion timestamp.")) } } else { if newNamespace.Status.Phase != api.NamespaceTerminating { allErrs = append(allErrs, errs.NewFieldInvalid("Status.Phase", newNamespace.Status.Phase, "A namespace may only be in terminating status if it has a deletion timestamp.")) } } </ins> return allErrs }
} func TestValidateNamespaceStatusUpdate(t *testing.T) { <ins> now := util.Now() </ins> tests := []struct { oldNamespace api.Namespace namespace    api.Namespace valid        bool }{ <del> {api.Namespace{}, api.Namespace{}, true}, </del> <ins> {api.Namespace{}, api.Namespace{ Status: api.NamespaceStatus{ Phase: api.NamespaceActive, }, }, true}, </ins> {api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: "foo"}}, api.Namespace{ ObjectMeta: api.ObjectMeta{ <del> Name: "foo"}, </del> <ins> Name:              "foo", DeletionTimestamp: &now}, </ins> Status: api.NamespaceStatus{ Phase: api.NamespaceTerminating, },
Name: "foo"}}, api.Namespace{ ObjectMeta: api.ObjectMeta{ <ins> Name: "foo"}, Status: api.NamespaceStatus{ Phase: api.NamespaceTerminating, }, }, false}, {api.Namespace{ ObjectMeta: api.ObjectMeta{ Name: "foo"}}, api.Namespace{ ObjectMeta: api.ObjectMeta{ </ins> Name: "bar"}, Status: api.NamespaceStatus{ Phase: api.NamespaceTerminating,
for i, test := range tests { test.namespace.ObjectMeta.ResourceVersion = "1" test.oldNamespace.ObjectMeta.ResourceVersion = "1" <del> errs := ValidateNamespaceStatusUpdate(&test.oldNamespace, &test.namespace) </del> <ins> errs := ValidateNamespaceStatusUpdate(&test.namespace, &test.oldNamespace) </ins> if test.valid && len(errs) > 0 { t.Errorf("%d: Unexpected error: %v", i, errs) t.Logf("%#v vs %#v", test.oldNamespace.ObjectMeta, test.namespace.ObjectMeta)
// prior to final deletion, we must ensure that finalizers is empty if len(namespace.Spec.Finalizers) != 0 { <del> err = fmt.Errorf("Unable to delete namespace %v because finalizers is not empty %v", namespace.Name, namespace.Spec.Finalizers) </del> <ins> err = fmt.Errorf("Namespace %v termination is in progress, waiting for %v", namespace.Name, namespace.Spec.Finalizers) return nil, err </ins> } return r.Etcd.Delete(ctx, name, nil) }
if err != nil { t.Fatalf("unexpected error: %v", err) } <ins> } func TestDeleteNamespaceWithIncompleteFinalizers(t *testing.T) { now := util.Now() fakeEtcdClient, helper := newHelper(t) fakeEtcdClient.ChangeIndex = 1 fakeEtcdClient.Data["/registry/namespaces/foo"] = tools.EtcdResponseWithError{ R: &etcd.Response{ Node: &etcd.Node{ Value: runtime.EncodeOrDie(latest.Codec, &api.Namespace{ ObjectMeta: api.ObjectMeta{ Name:              "foo", DeletionTimestamp: &now, }, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{api.FinalizerKubernetes}, }, Status: api.NamespaceStatus{Phase: api.NamespaceActive}, }), ModifiedIndex: 1, CreatedIndex:  1, }, }, } storage, _, _ := NewStorage(helper) _, err := storage.Delete(api.NewDefaultContext(), "foo", nil) if err == nil { t.Fatalf("expected error: %v", err) } } </ins> <del> // TODO: when we add life-cycle, this will go to Terminating, and then we need to test Terminating to gone </del> <ins> func TestDeleteNamespaceWithCompleteFinalizers(t *testing.T) { now := util.Now() fakeEtcdClient, helper := newHelper(t) fakeEtcdClient.ChangeIndex = 1 fakeEtcdClient.Data["/registry/namespaces/foo"] = tools.EtcdResponseWithError{ R: &etcd.Response{ Node: &etcd.Node{ Value: runtime.EncodeOrDie(latest.Codec, &api.Namespace{ ObjectMeta: api.ObjectMeta{ Name:              "foo", DeletionTimestamp: &now, }, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{}, }, Status: api.NamespaceStatus{Phase: api.NamespaceActive}, }), ModifiedIndex: 1, CreatedIndex:  1, }, }, } storage, _, _ := NewStorage(helper) _, err := storage.Delete(api.NewDefaultContext(), "foo", nil) if err != nil { t.Fatalf("unexpected error: %v", err) } </ins> }
if StatusStrategy.AllowCreateOnUpdate() { t.Errorf("Namespaces should not allow create on update") } <ins> now := util.Now() </ins> oldNamespace := &api.Namespace{ ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, Spec:       api.NamespaceSpec{Finalizers: []api.FinalizerName{"kubernetes"}}, Status:     api.NamespaceStatus{Phase: api.NamespaceActive}, } namespace := &api.Namespace{ <del> ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "9"}, </del> <ins> ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "9", DeletionTimestamp: &now}, </ins> Status:     api.NamespaceStatus{Phase: api.NamespaceTerminating}, } StatusStrategy.PrepareForUpdate(namespace, oldNamespace)
} } <ins> func normalizeName(name string) string { // If it's short enough, just leave it. if len(name) < LOAD_BALANCER_NAME_MAX_LENGTH-6 { return name } // Hash and truncate hash := md5.Sum([]byte(name)) truncated := name[0 : LOAD_BALANCER_NAME_MAX_LENGTH-6] shortHash := hash[0:6] return fmt.Sprintf("%s%s", truncated, string(shortHash)) } </ins> // CreateTCPLoadBalancer is an implementation of TCPLoadBalancer.CreateTCPLoadBalancer. // TODO(a-robinson): Don't just ignore specified IP addresses. Check if they're // owned by the project and available to be used, and use them if they are. <del> func (gce *GCECloud) CreateTCPLoadBalancer(name, region string, externalIP net.IP, ports []int, hosts []string, affinityType api.AffinityType) (string, error) { </del> <ins> func (gce *GCECloud) CreateTCPLoadBalancer(origName, region string, externalIP net.IP, ports []int, hosts []string, affinityType api.AffinityType) (string, error) { name := normalizeName(origName) </ins> err := gce.makeTargetPool(name, region, hosts, translateAffinityType(affinityType)) if err != nil { if !isHTTPErrorCode(err, http.StatusConflict) {
} // UpdateTCPLoadBalancer is an implementation of TCPLoadBalancer.UpdateTCPLoadBalancer. <del> func (gce *GCECloud) UpdateTCPLoadBalancer(name, region string, hosts []string) error { </del> <ins> func (gce *GCECloud) UpdateTCPLoadBalancer(origName, region string, hosts []string) error { name := normalizeName(origName) </ins> pool, err := gce.service.TargetPools.Get(gce.projectID, region, name).Do() if err != nil { return err
} // DeleteTCPLoadBalancer is an implementation of TCPLoadBalancer.DeleteTCPLoadBalancer. <del> func (gce *GCECloud) DeleteTCPLoadBalancer(name, region string) error { </del> <ins> func (gce *GCECloud) DeleteTCPLoadBalancer(origName, region string) error { name := normalizeName(origName) </ins> op, err := gce.service.ForwardingRules.Delete(gce.projectID, region, name).Do() if err != nil && isHTTPErrorCode(err, http.StatusNotFound) { glog.Infof("Forwarding rule %s already deleted. Continuing to delete target pool.", name)
<del> #!/bin/bash # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #     http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Create generic token following GCE standard create_token() { echo $(cat /dev/urandom | base64 | tr -d "=+/" | dd bs=32 count=1 2> /dev/null) } get_tokens_from_csv() { KUBE_BEARER_TOKEN=$(awk -F, '/admin/ {print $1}' ${KUBE_TEMP}/${1}_tokens.csv) KUBELET_TOKEN=$(awk -F, '/kubelet/ {print $1}' ${KUBE_TEMP}/${1}_tokens.csv) KUBE_PROXY_TOKEN=$(awk -F, '/kube_proxy/ {print $1}' ${KUBE_TEMP}/${1}_tokens.csv) } generate_admin_token() { echo "$(create_token),admin,admin" >> ${KUBE_TEMP}/known_tokens.csv } # Creates a csv file each time called (i.e one per kubelet). generate_kubelet_tokens() { echo "$(create_token),kubelet,kubelet" > ${KUBE_TEMP}/${1}_tokens.csv echo "$(create_token),kube_proxy,kube_proxy" >> ${KUBE_TEMP}/${1}_tokens.csv } </del>
<del> #!/bin/bash # Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #     http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Sane defaults for dev environments. The following variables can be easily overriden # by setting each as a ENV variable ahead of time: # KUBE_IMAGE, KUBE_MASTER_FLAVOR, KUBE_NODE_FLAVOR, NUM_NODES, NOVA_NETWORK and SSH_KEY_NAME # Shared KUBE_IMAGE="${KUBE_IMAGE-3eba4fbb-51da-4233-b699-8a4030561add}" # CoreOS (Stable) SSH_KEY_NAME="${SSH_KEY_NAME-id_kubernetes}" NOVA_NETWORK_LABEL="kubernetes-pool-net" NOVA_NETWORK_CIDR="${NOVA_NETWORK-192.168.0.0/24}" INSTANCE_PREFIX="kubernetes" # Master KUBE_MASTER_FLAVOR="${KUBE_MASTER_FLAVOR-general1-1}" MASTER_NAME="${INSTANCE_PREFIX}-master" MASTER_TAG="tags=${INSTANCE_PREFIX}-master" # Node KUBE_NODE_FLAVOR="${KUBE_NODE_FLAVOR-general1-2}" NUM_NODES="${NUM_NODES-4}" NODE_TAG="tags=${INSTANCE_PREFIX}-node" NODE_NAMES=($(eval echo ${INSTANCE_PREFIX}-node-{1..${NUM_NODES}})) KUBE_NETWORK="10.240.0.0/16" SERVICE_CLUSTER_IP_RANGE="10.0.0.0/16"  # formerly PORTAL_NET # Optional: Enable node logging. ENABLE_NODE_LOGGING=false LOGGING_DESTINATION=elasticsearch # Optional: When set to true, Elasticsearch and Kibana will be setup as part of the cluster bring up. ENABLE_CLUSTER_LOGGING=false ELASTICSEARCH_LOGGING_REPLICAS=1 # Optional: Cluster monitoring to setup as part of the cluster bring up: #   none     - No cluster monitoring setup #   influxdb - Heapster, InfluxDB, and Grafana #   google   - Heapster, Google Cloud Monitoring, and Google Cloud Logging ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}" # Optional: Install cluster DNS. ENABLE_CLUSTER_DNS="${KUBE_ENABLE_CLUSTER_DNS:-true}" DNS_SERVER_IP="10.0.0.10" DNS_DOMAIN="cluster.local" # Optional: Enable DNS horizontal autoscaler ENABLE_DNS_HORIZONTAL_AUTOSCALER="${KUBE_ENABLE_DNS_HORIZONTAL_AUTOSCALER:-false}" # Optional: Install Kubernetes UI ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}" </del>