diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 8b285cbb..01cc3efc 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -172,287 +172,287 @@ }, { "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/apps/v1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/apps/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/apps/v1beta2", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/authentication/v1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/authentication/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/authorization/v1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/authorization/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/autoscaling/v1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/autoscaling/v2beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/batch/v1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/batch/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/batch/v2alpha1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/certificates/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/coordination/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/core/v1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/events/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/extensions/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/networking/v1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/policy/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/rbac/v1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/rbac/v1alpha1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/rbac/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/scheduling/v1alpha1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/scheduling/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/settings/v1alpha1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/storage/v1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/storage/v1alpha1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/api/storage/v1beta1", - "Rev": "9e5ffd1f1320950b238cfce291b926411f0af722" + "Rev": "ded72da34a273a447508135b315f865aa6e48fc8" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/errors", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/cache", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/clock", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/version", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "ed135c5b96450fd24e5e981c708114fbbd950697" + "Rev": "97cca6cc910b472c65890ea424e84795ef4ddfb9" }, { "ImportPath": "k8s.io/client-go/discovery", diff --git a/README.md b/README.md index 0c822c42..1bb47157 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,8 @@ This is an example of how to build a kube-like controller with a single type. ```sh # assumes you have a working kubeconfig, not required if operating in-cluster -$ go run *.go -kubeconfig=$HOME/.kube/config +$ go build -o sample-controller . +$ ./sample-controller -kubeconfig=$HOME/.kube/config # create a CustomResourceDefinition $ kubectl create -f artifacts/examples/crd.yaml diff --git a/vendor/k8s.io/api/core/v1/generated.proto b/vendor/k8s.io/api/core/v1/generated.proto index 7b519909..b249feb3 100644 --- a/vendor/k8s.io/api/core/v1/generated.proto +++ b/vendor/k8s.io/api/core/v1/generated.proto @@ -4513,7 +4513,7 @@ message VolumeMount { // mountPropagation determines how mounts are propagated from the host // to container and the other way around. - // When not set, MountPropagationHostToContainer is used. + // When not set, MountPropagationNone is used. // This field is beta in 1.10. // +optional optional string mountPropagation = 5; diff --git a/vendor/k8s.io/api/core/v1/types.go b/vendor/k8s.io/api/core/v1/types.go index 99159ee7..4b78581f 100644 --- a/vendor/k8s.io/api/core/v1/types.go +++ b/vendor/k8s.io/api/core/v1/types.go @@ -1686,7 +1686,7 @@ type VolumeMount struct { SubPath string `json:"subPath,omitempty" protobuf:"bytes,4,opt,name=subPath"` // mountPropagation determines how mounts are propagated from the host // to container and the other way around. - // When not set, MountPropagationHostToContainer is used. + // When not set, MountPropagationNone is used. // This field is beta in 1.10. // +optional MountPropagation *MountPropagationMode `json:"mountPropagation,omitempty" protobuf:"bytes,5,opt,name=mountPropagation,casttype=MountPropagationMode"` diff --git a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index 0efd777a..17b5d318 100644 --- a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -2230,7 +2230,7 @@ var map_VolumeMount = map[string]string{ "readOnly": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", "mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.", "subPath": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", - "mountPropagation": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is beta in 1.10.", + "mountPropagation": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.", } func (VolumeMount) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http.go b/vendor/k8s.io/apimachinery/pkg/util/net/http.go index 7ea2df22..65e4ce71 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/http.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/http.go @@ -91,7 +91,8 @@ func SetOldTransportDefaults(t *http.Transport) *http.Transport { // ProxierWithNoProxyCIDR allows CIDR rules in NO_PROXY t.Proxy = NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment) } - if t.DialContext == nil { + // If no custom dialer is set, use the default context dialer + if t.DialContext == nil && t.Dial == nil { t.DialContext = defaultTransport.DialContext } if t.TLSHandshakeTimeout == 0 { @@ -129,7 +130,18 @@ func DialerFor(transport http.RoundTripper) (DialFunc, error) { switch transport := transport.(type) { case *http.Transport: - return transport.DialContext, nil + // transport.DialContext takes precedence over transport.Dial + if transport.DialContext != nil { + return transport.DialContext, nil + } + // adapt transport.Dial to the DialWithContext signature + if transport.Dial != nil { + return func(ctx context.Context, net, addr string) (net.Conn, error) { + return transport.Dial(net, addr) + }, nil + } + // otherwise return nil + return nil, nil case RoundTripperWrapper: return DialerFor(transport.WrappedRoundTripper()) default: