Skip to content

Commit

Permalink
Make route field optional when Ingress enabled (#94)
Browse files Browse the repository at this point in the history
* Make route field optional when Ingress enabled

* Fix typos in documentation
  • Loading branch information
arturdzm authored Apr 28, 2020
1 parent 123d75c commit f727977
Show file tree
Hide file tree
Showing 9 changed files with 5,159 additions and 11 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.5.1]

### Fixed

- Operator crash when Ingress is created without defining spec.route field ([#94](https://github.com/application-stacks/runtime-component-operator/pull/94))
- Unnecessary pod restarts due to adding kubectl.kubernetes.io/last-applied-configuration to resources created by the operator ([#94](https://github.com/application-stacks/runtime-component-operator/pull/94))


## [0.5.0]

### Added
Expand Down Expand Up @@ -40,7 +48,8 @@ All notable changes to this project will be documented in this file.
The initial release of the Runtime Component Operator 🎉


[Unreleased]: https://github.com/application-stacks/runtime-component-operator/compare/v0.5.0...HEAD
[Unreleased]: https://github.com/application-stacks/runtime-component-operator/compare/v0.5.1...HEAD
[0.5.1]: https://github.com/application-stacks/runtime-component-operator/releases/tag/v0.5.1
[0.5.0]: https://github.com/application-stacks/runtime-component-operator/releases/tag/v0.5.0
[0.4.2]: https://github.com/application-stacks/runtime-component-operator/releases/tag/v0.4.2
[0.4.1]: https://github.com/application-stacks/runtime-component-operator/releases/tag/v0.4.1
Expand Down
7 changes: 6 additions & 1 deletion deploy/releases/0.5.0/readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,9 @@ _Deleting the CRD will also delete all `RuntimeComponent` in the cluster_
* Knative support is limited. Values specified for `autoscaling`, `resources` and `replicas` parameters would not apply for Knative when enabled using `createKnativeService` parameter.
* The auto-creation of an application definition by kAppNav is not supported when Knative is enabled.
* Monitoring feature does not support integration with Knative Service. Prometheus Operator is required to use ServiceMonitor.
* After the initial deployment of `RuntimeComponent`, any changes to its labels would be applied only when one of the parameters from `spec` is updated.
* After the initial deployment of `RuntimeComponent`, any changes to its labels would be applied only when one of the parameters from `spec` is updated.

== Known Issues

* Operator can crash when creating Ingress resource if `spec.expose` is `true` and `spec.route` is not provided.
Possible fixes are either to disable Ingress by setting `spec.expose` to `false` or add `spec.route: {}`
72 changes: 72 additions & 0 deletions deploy/releases/0.5.1/readme.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
= Runtime Component Operator v0.5.1
== Changelog
All notable changes are documented in the link:++/CHANGELOG.md#0.5.1++[Changelog].

== Installation

The Runtime Component Operator can be installed to:

* watch own namespace
* watch another namespace
* watch multiple namespaces
* watch all namespaces in the cluster

Appropriate cluster role and binding are required to watch another namespace, watch multiple namespaces or watch all namespaces.

---

. Install `RuntimeComponent` Custom Resource Definition (CRD). This needs to be done only ONCE per cluster:

[source,sh]
----
kubectl apply -f https://raw.githubusercontent.com/application-stacks/runtime-component-operator/master/deploy/releases/0.5.1/runtime-component-crd.yaml
----

. Install the Runtime Component Operator:

.. Set operator namespace and the namespace to watch:
+
NOTE: Ensure that you replace `<SPECIFY_OPERATOR_NAMESPACE_HERE>` and `<SPECIFY_WATCH_NAMESPACE_HERE>` with proper values:
+
* To watch all namespaces in the cluster, set `WATCH_NAMESPACE='""'`
* To watch multiple namespaces in the cluster, set `WATCH_NAMESPACE` to a comma-separated list of namespaces e.g. `WATCH_NAMESPACE=example-ns-1,example-ns-2,example-ns-3`
+

[source,sh]
----
OPERATOR_NAMESPACE=<SPECIFY_OPERATOR_NAMESPACE_HERE>
WATCH_NAMESPACE=<SPECIFY_WATCH_NAMESPACE_HERE>
----

.. _Optional_: Install cluster-level role-based access. This step can be skipped if the operator is only watching own namespace:
+
[source,sh]
----
curl -L https://raw.githubusercontent.com/application-stacks/runtime-component-operator/master/deploy/releases/0.5.1/runtime-component-cluster-rbac.yaml \
| sed -e "s/RUNTIME_COMPONENT_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \
| kubectl apply -f -
----

.. Install the operator:
+
[source,sh]
----
curl -L https://raw.githubusercontent.com/application-stacks/runtime-component-operator/master/deploy/releases/0.5.1/runtime-component-operator.yaml \
| sed -e "s/RUNTIME_COMPONENT_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \
| kubectl apply -n ${OPERATOR_NAMESPACE} -f -
----

== Uninstallation

To uninstall the operator, run commands from Step 2.3 first and then Step 2.2 (if applicable), but after replacing `kubectl apply` with `kubectl delete`.

To delete the CRD, run command from Step 1, but after replacing `kubectl apply` with `kubectl delete`.

_Deleting the CRD will also delete all `RuntimeComponent` in the cluster_

== Current Limitations

* Knative support is limited. Values specified for `autoscaling`, `resources` and `replicas` parameters would not apply for Knative when enabled using `createKnativeService` parameter.
* The auto-creation of an application definition by kAppNav is not supported when Knative is enabled.
* Monitoring feature does not support integration with Knative Service. Prometheus Operator is required to use ServiceMonitor.
* After the initial deployment of `RuntimeComponent`, any changes to its labels would be applied only when one of the parameters from `spec` is updated.
113 changes: 113 additions & 0 deletions deploy/releases/0.5.1/runtime-component-cluster-rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: runtime-component-operator-RUNTIME_COMPONENT_OPERATOR_NAMESPACE
rules:
- apiGroups:
- ""
resources:
- pods
- services
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
- serviceaccounts
- namespaces
verbs:
- '*'
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- '*'
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- '*'
- apiGroups:
- apps
resourceNames:
- runtime-component-operator
resources:
- deployments/finalizers
verbs:
- update
- apiGroups:
- app.stacks
resources:
- '*'
verbs:
- '*'
- apiGroups:
- image.openshift.io
resources:
- '*'
verbs:
- '*'
- apiGroups:
- route.openshift.io
resources:
- routes
- routes/custom-host
verbs:
- '*'
- apiGroups:
- serving.knative.dev
resources:
- services
verbs:
- '*'
- apiGroups:
- cert-manager.io
resources:
- certificates
verbs:
- '*'
- apiGroups:
- app.k8s.io
resources:
- applications
verbs:
- '*'
- apiGroups:
- apps.openshift.io
resources:
- servicebindingrequests
verbs:
- '*'
- apiGroups:
- networking.k8s.io
- extensions
resources:
- ingresses
verbs:
- '*'
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: runtime-component-operator-RUNTIME_COMPONENT_OPERATOR_NAMESPACE
subjects:
- kind: ServiceAccount
name: runtime-component-operator
namespace: RUNTIME_COMPONENT_OPERATOR_NAMESPACE
roleRef:
kind: ClusterRole
name: runtime-component-operator-RUNTIME_COMPONENT_OPERATOR_NAMESPACE
apiGroup: rbac.authorization.k8s.io
Loading

0 comments on commit f727977

Please sign in to comment.