-
Notifications
You must be signed in to change notification settings - Fork 45
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
Readme for dashboard operator and updates stable version #56
Merged
k8s-ci-robot
merged 2 commits into
kubernetes-sigs:master
from
somtochiama:dashboard-readme
May 15, 2020
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# This is a simple guide for building an operator with kubebuilder version 2 | ||
|
||
## 1. Create a folder | ||
```bash | ||
mkdir dashboard | ||
cd dashboard | ||
``` | ||
|
||
## 2. Enable kubebuilder plugins and init | ||
```bash | ||
export KUBEBUILDER_ENABLE_PLUGINS=1 | ||
kubebuilder init --fetch-deps=false --domain=x-k8s.io --license=apache2 | ||
kubebuilder create api --pattern=addon --controller=true --example=false --group=addons --kind=Dashboard --make=false | ||
--namespaced=true --resource=true --version=v1alpha1 | ||
``` | ||
|
||
## 3. Run go mod vendor: | ||
|
||
```bash | ||
go mod vendor | ||
``` | ||
|
||
## 3. Delete unnecessary test files | ||
Delete the test suites that are checking that kubebuilder is working: | ||
|
||
```bash | ||
find . -name "*_test.go" -delete | ||
``` | ||
|
||
# Determine the stable version and include its manifest: | ||
|
||
Make a directory under `channels/packages/dashboard` for a stable version of the dashboard -- then download the manifest for it: | ||
```bash | ||
mkdir -p channels/packages/dashboard/2.0.0 | ||
wget -O channels/packages/dashboard/2.0.0/manifest.yaml https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml | ||
``` | ||
|
||
|
||
Define the stable channel: | ||
|
||
```bash | ||
cat > channels/stable <<EOF | ||
manifests: | ||
- version: 2.0.0 | ||
EOF | ||
``` | ||
|
||
Running the operator locally: | ||
|
||
```bash | ||
make install | ||
make run | ||
``` | ||
Logs from the operator appear in the console. | ||
|
||
Now in another terminal, create an instance of the Dashboard custom resource: | ||
```bash | ||
kubectl create ns kubernetes-dashboard | ||
kubectl -n kubernetes-dashboard apply -f config/samples/addons_v1alpha1_dashboard.yaml | ||
``` | ||
You should see the operator respond and apply the resources from your package. | ||
|
||
You can now continue to build your operator by following the [kubebuilder-declarative-pattern](https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern/tree/master/docs/addon/walkthrough#misc) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Versions for the stable channel | ||
manifests: | ||
- version: 1.8.3 | ||
- version: 2.0.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's one more thing we can help the reader understand :)