Skip to content

Commit

Permalink
Update: Plugin resources.
Browse files Browse the repository at this point in the history
* Experimental annotation until we can sort out the approval. kedacore/keda#552
* Url in docs pointing to the right resource
  • Loading branch information
frozenprocess committed May 13, 2023
1 parent 7708a81 commit 66bf0dc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 31 deletions.
6 changes: 3 additions & 3 deletions docs/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
To enable plugin support in the dashboard you must register a custom [CRD](../../aio/test-resources/plugin-crd.yml) in your cluster.

```shell
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/test-resources/plugin-crd.yml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/hack/test-resources/plugin-crd.yml
```

### Compiling Plugins
Expand All @@ -32,7 +32,7 @@ The key thing here is that we specify the `custom-plugin` project in the `angula
Once the custom CRD is registered we can now create [instances](../../aio/test-resources/plugin-test.yml) of the CRD which will hold the spec for plugin.

```shell
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/test-resources/plugin-test.yml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/hack/test-resources/plugin-test.yml
```

> Note: The backend reads the compiled plugin source from a ConfigMap and we need to create that also.
Expand All @@ -49,4 +49,4 @@ kubectl create configmap plugin1-src --from-file="./dist/bundle/plugin1.js"
After following all the above steps, your new plugin should be available in the dashboard.

----
_Copyright 2021 [The Kubernetes Dashboard Authors](https://github.com/kubernetes/dashboard/graphs/contributors)_
_Copyright 2021 [The Kubernetes Dashboard Authors](https://github.com/kubernetes/dashboard/graphs/contributors)_
56 changes: 30 additions & 26 deletions hack/test-resources/plugin-crd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,53 @@
# 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.
#

# A manifest that creates test plugin custom resource definition.

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: plugins.dashboard.k8s.io
annotations:
"api-approved.kubernetes.io": "unapproved - Experimental"
spec:
group: dashboard.k8s.io
scope: Namespaced
versions:
- name: v1alpha1
- name: v1
served: true
storage: true
names:
kind: Plugin
plural: plugins
singular: plugin
validation:
openAPIV3Schema:
type: object
properties:
spec:
schema:
openAPIV3Schema:
type: object
properties:
source:
spec:
type: object
properties:
configMapRef:
source:
type: object
properties:
name:
configMapRef:
type: object
properties:
name:
type: string
required:
- name
filename:
type: string
required:
- name
filename:
type: string
- configMapRef
- filename
dependencies:
type: array
items:
type: string
required:
- configMapRef
- filename
dependencies:
type: array
items:
type: string
- source
required:
- source
required:
- spec
- spec
names:
kind: Plugin
plural: plugins
singular: plugin
4 changes: 2 additions & 2 deletions hack/test-resources/plugin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# A manifest that creates test plugin resources.

apiVersion: dashboard.k8s.io/v1alpha1
apiVersion: dashboard.k8s.io/v1
kind: Plugin
metadata:
name: k8s-plugin
Expand All @@ -26,7 +26,7 @@ spec:

---

apiVersion: dashboard.k8s.io/v1alpha1
apiVersion: dashboard.k8s.io/v1
kind: Plugin
metadata:
name: plugin1
Expand Down

0 comments on commit 66bf0dc

Please sign in to comment.