Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions modules/osdk-upgrading-v130-to-v180.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,9 @@ endif
----
====

. Make the following changes to your `config/rbac/service_account.yaml` file:
. Add a `system:controller-manager` service account to your project. A non-default service account `controller-manager` is now generated by the `operator-sdk init` command to improve security for Operators installed in shared namespaces. To add this service account to your existing project, follow these steps:

.. Add a `system:controller-manager` service account to your project.
+
A non-default service account `controller-manager` is now generated by the `operator-sdk init` command to improve security for Operators installed in shared namespaces. To add this service account to your existing project, follow these steps:

... Create the `ServiceAccount` definition in a file:
.. Create the `ServiceAccount` definition in a file:
+
.`config/rbac/service_account.yaml` file
[%collapsible]
Expand All @@ -478,28 +474,28 @@ metadata:
----
====

... Add the service account to the list of RBAC resources:
.. Add the service account to the list of RBAC resources:
+
[source,terminal]
----
$ echo "- service_account.yaml" >> config/rbac/kustomization.yaml
----

... Update all `RoleBinding` and `ClusterRoleBinding` objects that reference the Operator's service account:
.. Update all `RoleBinding` and `ClusterRoleBinding` objects that reference the Operator's service account:
+
[source,terminal]
----
$ find config/rbac -name *_binding.yaml -exec sed -i -E 's/ name: default/ name: controller-manager/g' {} \;
----

... Add the service account name to the manager deployment's `spec.template.spec.serviceAccountName` field:
.. Add the service account name to the manager deployment's `spec.template.spec.serviceAccountName` field:
+
[source,terminal]
----
$ sed -i -E 's/([ ]+)(terminationGracePeriodSeconds:)/\1serviceAccountName: controller-manager\n\1\2/g' config/manager/manager.yaml
----

... Verify the changes look like the following diffs:
.. Verify the changes look like the following diffs:
+
.`config/manager/manager.yaml` file diff
[%collapsible]
Expand Down