The Service Account Token link in the readme is broken and refers to a page that no longer exists.
In this PR I updated the correct link in the readme
Kubernetes-commit: 279a663f948337da156f544b74e41928ad66f9ef
5 years after third party resources were removed, we're probably just confusing readers with this reference.
Kubernetes-commit: d21fc6e762276747e3306cfaf27b0ce1201071c2
Note that the fake client isn't designed to work with informer. It
doesn't support resource version. It's encouraged to use a real client
in an integration/E2E test if you need to test complex behavior with
informer/controllers.
Kubernetes-commit: 942bc9b32e39bb9c6ca045c02b48cc84dfa86633
Updated the --image-pull-policy=Never option with default
'IfNotPresent'. 'Never' causes the pod to be in
state: ErrImageNeverPull
Kubernetes-commit: 7400cf937b9fcc31dc29caa8d90800940602b934
It is inconsistent and confusing to report pod count from all
namespaces but report message for only default namespace.
Added the namespace (default) reporting to clarify this.
Updated comments for usage clarity.
Kubernetes-commit: 31e427b54c500f2e532ebeb1990eb7580bf86729
Make a small formatting change to make it clear that you must take the
RBAC actions regardless of whether you're using Minikube or not.
Kubernetes-commit: fb4148e5f81057cd6a2b1e2840e3562516834446
Added missing quote cause uncommenting the line to to load all auth plugins resulted in a syntax error.
Kubernetes-commit: a968f52611a36925c3736652a6e9d786903ce090
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
* github.com/kubernetes/repo-infra
* k8s.io/gengo/
* k8s.io/kube-openapi/
* github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods
Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
Kubernetes-commit: 954996e231074dc7429f7be1256a579bedd8344c
If the permissions are not setup correctly the example fails.
Change-Id: I167ef68be66f8b56740236ae475c3b7fdcc0dfb5
Kubernetes-commit: d222c310aaa4ce8777094f4a37a920982aff794d
The fakeclient package does not have any non-test go files. This
causes `go build` to give a warning: `no non-test Go files in ...`.
This also causes the publishing bot to fail.
This PR adds a dummy doc.go file in the package to avoid this warning.
Kubernetes-commit: 764ae69671428987d77898b2d3c48c6c003e2fd4
This adds an example showing the steps needed to get a working
SharedInformerFactory with a fake client for testing.
Kubernetes-commit: aed487b42d1b49df9ac01f7234896f6d1b4da166
This fixes some scope isses that were introduced by shadowing vars inside anonymous functions as well as using a naked return.
Fixed by using unique err names and explicitly returning errors.
Additional improvement is using the HomeDir() util function provided by client-go instead of including a helper function at the bottom of this example.
Signed-off-by: John Kelly <jekohk@gmail.com>
Kubernetes-commit: e71c9f1b4beb06bcd3694163e6bf1764fb49edd6
This updates the create-update-delete-deployment example with the following:
Make use of client-go retry util in Update() steps instead of simple for loops.
Using RetryOnConflict is generally better practice as it won't become stuck in a retry loop and uses exponential backoff to prevent exhausting the apiserver.
Instead of changing annotations to demonstrate Updates/Rollbacks, change the container image as it is less confusing for readers and a better real-world example.
Improve comments and README to reflect above changes.
Signed-off-by: John Kelly <jekohk@gmail.com>
Kubernetes-commit: 94f5bcf6f77d5b35074dfab47b5de37096d8ee00
This updates the create-update-delete-deployment example with the following:
Add rollback step to demonstrate rolling back deployments with client-go.
Modify the for-loops used in both Update steps to Get() the latest version
of the Deployment from the server before attempting Update().
This is necessary because the object returned by Create() does
not have the new resourceVersion, causing the initial Update() to always fail
due to conflicting resource versions. Putting the Get() at the top of the
loop seems to fix this bug.
Make -kubeconfig flag optional if config is in default location, using the
same method found in the out-of-cluster example.
Patch is motivated by effort to improve client-go examples.
Signed-off-by: John Kelly <jekohk@gmail.com>
Kubernetes-commit: ce73088a718c30d8a3577f5d0521584b9c201e69