Skip to content

Commit

Permalink
[feat] Update operator bundle to upgrade, fix up documentation (#270)
Browse files Browse the repository at this point in the history
* mage BuildBundle

* moving updating to 1.21 outta here

Signed-off-by: schristoff <28318173+schristoff@users.noreply.github.com>
  • Loading branch information
schristoff authored Sep 26, 2023
1 parent afad302 commit 47532ba
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 16 deletions.
2 changes: 1 addition & 1 deletion config/crd/bases/getporter.org_agentactions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: agentactions.getporter.org
spec:
group: getporter.org
Expand Down
8 changes: 7 additions & 1 deletion config/crd/bases/getporter.org_agentconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: agentconfigs.getporter.org
spec:
group: getporter.org
Expand Down Expand Up @@ -102,6 +102,12 @@ spec:
Porter will request when running the Porter Agent. It is used to
determine what the storage class will be for the volume requested
type: string
ttlSecondsAfterFinished:
default: 600
description: TTLSecondsAfterFinished set the time limit of the lifetime
of a Job that has finished execution.
format: int32
type: integer
volumeSize:
description: VolumeSize is the size of the persistent volume that
Porter will request when running the Porter Agent. It is used to
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/getporter.org_credentialsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: credentialsets.getporter.org
spec:
group: getporter.org
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/getporter.org_installationoutputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: installationoutputs.getporter.org
spec:
group: getporter.org
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/getporter.org_installations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: installations.getporter.org
spec:
group: getporter.org
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/getporter.org_parametersets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: parametersets.getporter.org
spec:
group: getporter.org
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/getporter.org_porterconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: porterconfigs.getporter.org
spec:
group: getporter.org
Expand Down
4 changes: 2 additions & 2 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ The operator is still under development, but it is ready for you to try out and
* [QuickStart: Using the Porter Operator](/operator/quickstart/)
* [Porter Operator File Formats](/operator/file-formats/)
* [Configure the Porter Agent]
[porter installation apply]: /cli/porter_installations_apply/
[Desired State QuickStart]: /quickstart/desired-state/
[porter installation apply]: https://porter.sh/cli/porter_installations_apply/
[Desired State QuickStart]: https://porter.sh/docs/introduction/concepts-and-components/intro-desired-state/
49 changes: 44 additions & 5 deletions docs/content/quickstart/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@ In this QuickStart you will learn how to install and use the [Porter Operator] o

## Install the Operator

🚨 If you are using [KinD] or [Minikube] please make sure to visit the integration pages before starting. 🚨

The Porter Operator is installed using Porter, and requires an existing Kubernetes cluster.
First, generate a credential set that points to the location of your kubeconfig file, for example using the path $HOME/.kube/config.

The commands below use the v0.7.1 release, but there may be a more recent release of the Operator.
The commands below use the v1.0.0 release, but there may be a more recent release of the Operator.
Check our [releases page](https://github.com/getporter/operator/releases) and use the most recent version number.

```
porter credentials generate porterops -r ghcr.io/getporter/porter-operator:v0.8.0
porter credentials generate porterops -r ghcr.io/getporter/porter-operator:v1.0.0
```

Now that Porter knows which cluster to target, install the Operator with the following command:

```
porter install porterops -c porterops -r ghcr.io/getporter/porter-operator:v0.8.0
porter install porterops -c porterops -r ghcr.io/getporter/porter-operator:v1.0.0
```

Before you use the operator, you need to configure a Kubernetes namespace with the necessary configuration.
Expand Down Expand Up @@ -336,13 +338,50 @@ The operator will use `porter plugins install` to install defined plugins. Any b

If no plugins are required, this field is optional.

## Upgrade Operator Manager Image
The Operator Manager Image will be built the the most recent version to run. However if you'd like to change the repository or SHA of the image here's how it can be done.

In the `porter.yaml` we specify the following parameters:

```yaml
- name: operator-repository
description: Porter Operator Manager Image Repository
type: string
default: ""
- name: operator-digest
description: Porter Operator Manager Image Digest (defaults to a stable version)
type: string
default: ""
```

When upgrading, these could be passed in by using a paramter set or by CLI flags:

```
porter upgrade porterops -c porterops --param operator-repository=localhost:5000
```

## Injecting Kube Config via Parameters
If you do not want to set the kube config credential by creating a credential set, then
there is a way to inject the kube config into the bundle by utilizing parameters.

🚨 This is a workaround and we will be working on building this out as a feature shortly

By using a base64 encoded string containing the kube config it can be passed as a parameter:

```yaml
parameters:
namespace: mysql
mysql-name: carolyn-mysql
kubeconfig: YXBpVmVyc2lvbjogdjEKY2x1c.... # generated with cat kube.config > base64 -w 0
```

## Next Steps

You now know how to install and configure the Porter Operator. The project is still incomplete, so watch this repository for updates!

* [Porter Operator Custom Resources](/operator/file-formats/)

[install-porter]: https://github.com/getporter/porter/releases?q=v1.0.0&expanded=true
[KinD]: /best-practices/kind/
[Minikube]: /best-practices/minikube/
[KinD]: https://porter.sh/docs/integrations/kind/
[Minikube]: https://porter.sh/docs/integrations/minikube/
[getporter/hello-llama]: https://hub.docker.com/r/getporter/hello-llama
12 changes: 10 additions & 2 deletions installer/vanilla.porter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ registry: ghcr.io/getporter
dockerfile: Dockerfile.tmpl

parameters:
- name: operator_repository
description: Porter Operator Manager Image Repository
type: string
default: ""
- name: operator_digest
description: Porter Operator Manager Image Digest (defaults to a stable version)
type: string
default: ""
- name: namespace
description: Setup Porter in this namespace
type: string
Expand Down Expand Up @@ -172,5 +180,5 @@ images:
manager:
description: "The porter operator manager"
imageType: "docker"
repository: "PLACEHOLDER"
digest: "PLACEHOLDER"
repository: ${ bundle.parameters.operator_repository }
digest: ${ bundle.parameters.operator_digest }

0 comments on commit 47532ba

Please sign in to comment.