Skip to content
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

add administrators doc for configre porter agent #150

Merged
merged 3 commits into from
Feb 8, 2023

Conversation

VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Feb 6, 2023

This doc pages demonstrates some ways to configure porter agent for various use cases
related issue: #122

@VinozzZ VinozzZ requested a review from carolynvs February 6, 2023 20:57
@codecov
Copy link

codecov bot commented Feb 6, 2023

Codecov Report

Merging #150 (4732b39) into main (30e1bdb) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #150   +/-   ##
=======================================
  Coverage   76.75%   76.75%           
=======================================
  Files          13       13           
  Lines        1540     1540           
=======================================
  Hits         1182     1182           
  Misses        227      227           
  Partials      131      131           
Flag Coverage Δ
unit-tests 76.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, I just have some minor edits

description: How to customize Porter Agent
---

The Porter Agent is a critical component in executing Porter commands in a controlled and reliable manner. With the AgentConfig Custom Resource Definition (CRD), you can customize the Porter Agent to meet your specific needs and requirements.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a quick definition of what the agent is and does. How about

Suggested change
The Porter Agent is a critical component in executing Porter commands in a controlled and reliable manner. With the AgentConfig Custom Resource Definition (CRD), you can customize the Porter Agent to meet your specific needs and requirements.
The Porter Agent is a containerized version of the Porter CLI that is optimized for running Porter commands on a Kubernetes cluster. With the AgentConfig Custom Resource Definition (CRD), you can customize how the Porter Agent is run to meet your specific needs and requirements. For example, you can specify the version of Porter to use, install additional Porter plugins, or provide a custom Porter config file.

spec:
porterRepository: <your-own-repository>
porterVersion: v1.2.3
serviceAccount: <service-account-for-porter-agent>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's include a quick mention of the RBAC roles that the operator ships with by default so that they know that they can use those to properly assign permissions to a custom service account.


## Configuring Porter Plugins

In addition to specifying the version of Porter, you can also specify the plugins you need to install before bundle executions. For example, if you want to use the Kubernetes and Azure plugins, you can configure the AgentConfig like this:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In addition to specifying the version of Porter, you can also specify the plugins you need to install before bundle executions. For example, if you want to use the Kubernetes and Azure plugins, you can configure the AgentConfig like this:
You can also specify any required plugins necessary for your installation of Porter. For example, if you want to use the Kubernetes and Azure plugins, you can configure the AgentConfig like this:

metadata:
name: customAgent
spec:
porterRepository: <your-own-repository>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we just list the relevant config for the part of the config file we are providing an example for, and remove the repo and version here?


The schema for the pluginConfigFile field is defined [in the Porter reference documentation](/reference/file-formats/#plugins).

🚨 WARNING: By default, the plugin version is set to `latest`. However, it is recommended to specify the plugin version to avoid any unexpected behavior that could result from an outdated plugin.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
🚨 WARNING: By default, the plugin version is set to `latest`. However, it is recommended to specify the plugin version to avoid any unexpected behavior that could result from an outdated plugin.
🚨 WARNING: By default, the plugin version is set to `latest`. We recommend pinning to specific version of any plugins used to avoid undesired behavior caused a stale plugin cache. Porter currently does not expire cached installations of plugins, so installing "latest" will not pick up new versions of plugins when they are released.

Signed-off-by: Yingrong Zhao <[email protected]>
@@ -44,21 +44,22 @@ spec:
installationServiceAccount: <service-account-for-the-installation>
```

The porter operator ships two pre-defined ClusterRole, editor role and viewer role, for AgentConfig resources to help you to properly assign permissions to a custom service account.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you include the full role names here or are they not a well-defined name?

Signed-off-by: Yingrong Zhao <[email protected]>
Copy link
Member

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@VinozzZ VinozzZ merged commit 740f5f5 into getporter:main Feb 8, 2023
@VinozzZ VinozzZ deleted the administrator-doc branch February 8, 2023 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants