Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/go.uber.org/zap-1.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
schristoff authored Sep 11, 2023
2 parents 6c45143 + 8dc0095 commit 0114296
Show file tree
Hide file tree
Showing 59 changed files with 516 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

/docs/content/ @iennae

* @schristoff @sgettys @bdegeeter
* @schristoff @sgettys @bdegeeter @troy0820
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ site/docs.

or use only Hugo

1. Download and install [Hugo 0.115.4](https://github.com/gohugoio/hugo/releases/tag/v0.115.4) extended version.
1. Download and install [Hugo 0.117.0](https://github.com/gohugoio/hugo/releases/tag/v0.117.0) extended version.
2. `cd docs`
3. `hugo server --watch`

Expand Down
3 changes: 2 additions & 1 deletion OWNERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ These are the members of the [maintainers team](https://github.com/orgs/getporte
* [Steven Gettys](https://github.com/sgettys)
* [Sarah Christoff](https://github.com/schristoff)
* [Aaron Schlesinger](https://github.com/arschles)
* [Troy Connor](https://github.com/troy0820)

## Emeritus Maintainers

Emeritus maintainers are former maintainers of the Porter project.
We appreciate their commitment to the project and want to recognize their work after they have moved on to other things.

* [Vaughn Dice](https://github.com/vdice)
* [Carolyn Van Slyck](https://github.com/carolynvs)
* [Carolyn Van Slyck](https://github.com/carolynvs)
10 changes: 8 additions & 2 deletions cmd/porter/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@ func buildBundleCommands(p *porter.Porter) *cobra.Command {

func buildBundleCreateCommand(p *porter.Porter) *cobra.Command {
return &cobra.Command{
Use: "create",
Use: "create [bundle-name]",
Short: "Create a bundle",
Long: "Create a bundle. This generates a porter bundle in the current directory.",
Long: "Create a bundle. This command creates a new porter bundle with the specified bundle-name, in the directory with the specified bundle-name." +
" The directory will be created if it doesn't already exist. If no bundle-name is provided, the bundle will be created in current directory and the bundle name will be 'porter-hello'.",
Args: cobra.MaximumNArgs(1), // Expect at most one argument for the bundle name
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) > 0 {
bundleName := args[0]
return p.CreateInDir(bundleName)
}
return p.Create()
},
}
Expand Down
11 changes: 10 additions & 1 deletion cmd/porter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)

var includeDocsCommand = false
Expand Down Expand Up @@ -188,7 +189,15 @@ Try our QuickStart https://getporter.org/quickstart to learn how to use Porter.
// Reload configuration with the now parsed cli flags
p.DataLoader = cli.LoadHierarchicalConfig(cmd)
ctx, err := p.Connect(cmd.Context())
cmd.SetContext(ctx)

// Extract the parent span from the main command
parentSpan := trace.SpanFromContext(cmd.Context())

// Create a context with the main command's span
ctxWithRootCmdSpan := trace.ContextWithSpan(ctx, parentSpan)

// Set the new context to the command
cmd.SetContext(ctxWithRootCmdSpan)
return err
},
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion docs/content/administration/collect-diag-porter.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Porter automatically uses the standard [OpenTelemetry environment variables] to

Below is an example trace from running the porter upgrade command. You can see timings for each part of the command, and relevant variables used.

![Screen shot of the Jaeger UI showing that porter upgrade was run](/administrators/jaeger-trace-example.png)
![Screen shot of the Jaeger UI showing that porter upgrade was run](../jaeger-trace-example.png)

If you are running a local grpc OpenTelemetry collector, for example with the [otel-jaeger bundle], you can set the following environment variables to have Porter send telemetry data to it.
The environment variables below enable telemetry, and use standard OpenTelemetry environment variables to point to an unsecured grpc OpenTelemetry collector.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/administration/inspecting-bundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aliases:
- /inspect-bundle/
---

You've found a bundle that you'd like to use, but you'd like to what images will be used after you install the bundle. You can use the `porter inspect` command to see this information. If you'd like to see additional information, like parameters, credentials, and outputs, see the [explain](/examine-bundles) command.
You've found a bundle that you'd like to use, but you'd like to what images will be used after you install the bundle. You can use the `porter inspect` command to see this information. If you'd like to see additional information, like parameters, credentials, and outputs, see the [explain](/operations/examine-bundles/) command.

When a bundle is published, the images that it will use are copied into the location of the published bundle. This simplifies access control and management of artifacts in the repository. The `inspect` command will show the invocation images, as well as any referenced images, that will be used as a result of performing actions like install nad upgrade. For each image, you will see the image reference that will be used, along with the original image reference that the image was copied from.

Expand Down
5 changes: 2 additions & 3 deletions docs/content/architecture-buildtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Porter does not support specifying which version of a mixin to use in a bundle y
You can follow the [Mixins are Bundles proposal](https://github.com/getporter/proposals/blob/main/pep/005-mixins-are-bundles.md) to keep track of that feature's progress.

When the bundle author runs `porter build`, Porter first generates a Dockerfile to create an image for the bundle (known as the invocation image or installer).
You can define your own [custom Dockerfile](bundle/custom-dockerfile/) to customize and optimize the image.
You can define your own [custom Dockerfile](/bundle/custom-dockerfile/) to customize and optimize the image.
The Dockerfile contains the following: a base image (debian), additional customizations generated by the mixins, and a COPY statement to include the files contained in the bundle directory where the porter.yaml file is located.
A copy of the Porter runtime, the mixin runtimes and the porter.yaml file are copied into the bundle.
After the image is built, Porter then generates a CNAB-compliant bundle.json file that defines the bundle's metadata.
Expand All @@ -28,8 +28,7 @@ After the image is built, Porter then generates a CNAB-compliant bundle.json fil

* [Create a bundle](/bundle/create/)
* [Use a custom Dockerfile](/bundle/custom-dockerfile/)
* [Mixin Architecture](/mixin-dev-guide/architecture/)
* [Building the Invocation Image](/build-image/)
* [Mixin Architecture](/how-to-guides/work-with-mixins)
* [Distribute a bundle](/distribute-bundles/)
* [Porter Runtime](/architecture-runtime/)

Expand Down
6 changes: 3 additions & 3 deletions docs/content/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The bundle author then builds the bundle into an OCI artifact which includes a d
Once a bundle is built, it can be distributed using Docker / OCI registries.
This allows you to use existing tools and infrastructure to share your application with other teams, customers, and end-users.

Because the bundle contains everything you need to deploy, included referenced images, you can even [move a bundle into a disconnected or airgapped environment](/administrators/airgap/).
Because the bundle contains everything you need to deploy, included referenced images, you can even [move a bundle into a disconnected or airgapped environment](/administration/move-bundles-airgapped/).
When written with airgap deployments in mind, a bundle can be deployed anywhere without requiring access to the original network or the internet.

Learn more about [how Porter works at buildtime](/architecture-buildtime/).
Expand All @@ -44,8 +44,8 @@ Learn more about [how Porter works at runtime](/architecture-runtime/).
## See Also

* [Security Features](/security-features/)
* [Create a Bundle](/bundle/create/)
* [Distribute Bundles](/distribute-bundles/)
* [Create a Bundle](/getting-started/create-bundle/)
* [Distribute Bundles](/development/distribute-bundles/)
* [Airgapped Deployments](/administrators/airgap/)

[mixins]: /mixins/
2 changes: 1 addition & 1 deletion docs/content/best-practices/credentials-or-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ Read [Upgrade Your Plugins to securely store sensitive data](/blog/persist-sensi
## See Also

* [Credentials Overview](/credentials/)
* [Parameters Overview](/parameters/)
* [Parameters Overview](/quickstart/parameters/)
4 changes: 2 additions & 2 deletions docs/content/bundle/manifest/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The manifest is made up of multiple components. See the [Manifest File Format] f

We have full [examples](https://github.com/getporter/examples) of Porter manifests in the Porter repository.

[templates]: /authors/templates/
[templates]: /development/using-templates/
[Manifest File Format]: /reference/file-formats/#manifest

## Bundle Metadata
Expand Down Expand Up @@ -521,7 +521,7 @@ the `repository` and `digest` attributes. For example:
image: ${bundle.images.websvc.repository}@${bundle.images.websvc.digest}
```

At runtime, these will be updated appropriately if a bundle has been [copied](/copy-bundles). Note that while `tag` is available, you should prefer the use of `digest`.
At runtime, these will be updated appropriately if a bundle has been [copied](/administration/copy-bundles/). Note that while `tag` is available, you should prefer the use of `digest`.

Here is a breakdown of all the supported fields on an image in this section of the manifest:

Expand Down
4 changes: 2 additions & 2 deletions docs/content/configuration/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Use the trace and logs configuration sections below to configure how logs and te

#### Logs

Porter can be configured to [write a logfile for each command](/administrators/diagnostics/#logs).
Porter can be configured to [write a logfile for each command](/administration/collect-diag-porter/#logs).

The following log settings are available:

Expand Down Expand Up @@ -272,7 +272,7 @@ telemetry:
### Dependencies v2

The `dependencies-v2` experimental flag is not yet implemented.
When it is completed, it is used to activate the features from [PEP003 - Advanced Dependencies](https://github.com/getporter/proposals/blob/main/pep/003-dependency-namespaces-and-labels.md).
When it is completed, it is used to activate the features from [PEP003 - Advanced Dependencies](https://github.com/getporter/proposals/blob/main/pep/003-advanced-dependencies.md).

## Common Configuration Settings

Expand Down
2 changes: 1 addition & 1 deletion docs/content/development/dist-a-mixin.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ systems:
* GOOS: windows, linux, darwin
* GOARCH: amd64

If you are creating your mixin in Go, you may find the [Makefile][mk] that we use
If you are creating your mixin in Go, you may find the [magefile](https://github.com/getporter/skeletor/blob/main/magefile.go) that we use
for our Porter mixins helpful as a starting point.

## Publish
Expand Down
4 changes: 2 additions & 2 deletions docs/content/getting-started/create-bundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Now that you know how to create a bundle, here are some more detailed topics on

[install Porter]: /install/
[Porter Visual Studio Code]: https://marketplace.visualstudio.com/items?itemName=getporter.porter-vscode
[hello example bundle]: /examples/hello/
[hello example bundle]: /references/examples/hello/
[manifest]: /bundle/manifest/
[local-registry]: https://docs.docker.com/registry/deploying/#run-a-local-registry
[porter create]: /cli/porter_create/
Expand All @@ -190,7 +190,7 @@ Now that you know how to create a bundle, here are some more detailed topics on
[porter install]: /cli/porter_install/
[porter mixins search]: /cli/porter_mixins_search/
[porter explain]: /cli/porter_explain/
[porter mixin install]: /cli/porter_mixin_install/
[porter mixin install]: /cli/porter_mixins_install/
[Mixins]: /mixins/
[create a custom mixin]: /mixin-dev-guide/
[terraform mixin]: /mixins/terraform/
Expand Down
2 changes: 1 addition & 1 deletion docs/content/getting-started/migrate-v0-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@ Do not publish a Porter v1 bundle on top of an existing bundle, otherwise older

[mongodb-docker]: /plugins/mongodb-docker
[mongodb]: /plugins/mongodb/
[File Formats]: https://release-v1.porter.sh/reference/file-formats/
[File Formats]: https://getporter.org/references/file-formats/
2 changes: 1 addition & 1 deletion docs/content/integrations/kind.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

### Porter time!

Porter bundles that access a Kubernetes cluster when running can now be installed as normal, once the [Credential Set](../credentials) is generated/edited to use the KinD kubeconfig.
Porter bundles that access a Kubernetes cluster when running can now be installed as normal, once the [Credential Set](/references/file-formats/credential-set/) is generated/edited to use the KinD kubeconfig.

Here we'll create and edit credentials and then install the [MySQL bundle](/src/build/testdata/bundles/mysql):

Expand Down
2 changes: 1 addition & 1 deletion docs/content/introduction/intro-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ add your own to the list.
[mongodb plugin]: /plugins/mongodb/
[mongodb-docker plugin]: /plugins/mongodb-docker/

[vs]: /mixins-vs-plugins/
[vs]: /introduction/mixins-vs-plugins/
[types]: /plugins/types/
[search-guide]: /package-search/
2 changes: 1 addition & 1 deletion docs/content/mixin-dev-guide/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,4 @@ $ ~/.porter/mixins/exec/exec version --output json
[JSON Schema Validator]: https://www.jsonschemavalidator.net/
[YAML to JSON converter]: https://www.convertjson.com/yaml-to-json.htm
[exec mixin schema]: /src/pkg/exec/schema/exec.json
[helm mixin schema]: /helm-mixin/src/pkg/helm/schema/schema.json
[helm mixin schema]: https://github.com/MChorfa/porter-helm3/blob/master/pkg/helm3/schema/schema.json
2 changes: 1 addition & 1 deletion docs/content/mixins/docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ See more information via the [Porter documentation](/author-bundles/#docker).
## Mixin Syntax
See the [docker-compose CLI Command Reference](https://docs.docker.com/docker-compose/reference/) for the supported commands.
See the [docker-compose CLI Command Reference](https://docs.docker.com/compose/reference/) for the supported commands.
```yaml
docker-compose:
Expand Down
4 changes: 2 additions & 2 deletions docs/content/package-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ description: Find a plugin for Porter and list your own plugin in our search res
## Search

Porter maintains lists for mixins and plugins available for users to install.
These can be searched via [porter mixin search](/cli/porter_mixin_search/) or
[porter plugin search](/cli/porter_plugin_search/).
These can be searched via [porter mixins search](/cli/porter_mixins_search/) or
[porter plugins search](/cli/porter_plugins_search/).

For example, here we search for mixins with the term `az` in the name:

Expand Down
4 changes: 2 additions & 2 deletions docs/content/quickstart/desired-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ In this QuickStart you learned how to manage installations using desired state b
* [Automating Porter with the Porter Operator](/operator/)
* [Create a bundle](/development/create-a-bundle/)

[managing installations]: /end-users/installations/
[managing installations]: /operations/manage-installations/
[porter credentials apply]: /cli/porter_credentials_apply/
[porter parameters apply]: /cli/porter_parameters_apply/
[porter installation apply]: /cli/porter_installation_apply/
[porter installation apply]: /cli/porter_installations_apply/
2 changes: 1 addition & 1 deletion docs/content/quickstart/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For this quickstart, the main concepts that you will use include:
- Installation - An instance of a bundle installed to your system.
- Tag - A reference to the bundle in an OCI registry that contains the registry, bundle name, and version, e.g. myregistry.com/mybundle:v1.0.
- Registry - An OCI compliant artifact store.
Many Docker registries are now OCI compliant and work with bundles, here's a list of [popular registries have been tested with Porter](/compatible-registries).
Many Docker registries are now OCI compliant and work with bundles, here's a list of [popular registries have been tested with Porter](/references/compatible-registries).

## Understand a Bundle

Expand Down
4 changes: 2 additions & 2 deletions docs/content/references/cli/bundles_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Create a bundle

### Synopsis

Create a bundle. This generates a porter bundle in the current directory.
Create a bundle. This generates a porter bundle in the directory with the specified name or in the current directory if no name is provided.

```
porter bundles create [flags]
porter bundles create [bundle-name] [flags]
```

### Options
Expand Down
4 changes: 2 additions & 2 deletions docs/content/references/cli/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Create a bundle

### Synopsis

Create a bundle. This generates a porter bundle in the current directory.
Create a bundle. This generates a porter bundle in the directory with the specified name or in the current directory if no name is provided.

```
porter create [flags]
porter create [bundle-name] [flags]
```

### Options
Expand Down
4 changes: 3 additions & 1 deletion docs/content/references/cli/mixins_feed_generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ VERSION/MIXIN-GOOS-GOARCH[FILE_EXT]

More than one mixin may be present in the directory, and the directories may be nested a few levels deep, as long as the file path ends with the above naming convention, porter will find and match it. Below is an example directory structure that porter can list to generate a feed:

```
bin/
└── v1.2.3/
├── mymixin-darwin-amd64
├── mymixin-linux-amd64
└── mymixin-windows-amd64.exe
```

See https://getporter.org/mixin-dev-guide/distribution more details.
See https://getporter.org/development/dist-a-mixin/ more details.


```
Expand Down
2 changes: 1 addition & 1 deletion docs/content/references/cli/storage_migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Migrate data from v0.38 to v1

Migrate data from Porter v0.38 into a v1 installation of Porter.

See https://getporter.org/storage-migrate for a full description of the migration process. Below is a summary:
See https://getporter.org/getting-started/migrate-v0-v1 for a full description of the migration process. Below is a summary:

Before running this command, you should have:

Expand Down
2 changes: 1 addition & 1 deletion docs/content/references/docker-images/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ kubectl apply -f https://raw.githubusercontent.com/getporter/porter/a059a9668934

[configuration]: /configuration
[porter-agent]: https://github.com/getporter/porter/pkgs/container/porter-agent
[porter client]: /docker-images/client/
[porter client]: /references/docker-images/client/
[Porter Operator]: https://github.com/getporter/operator
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ credentials:
| credentials.name | true | The name of the credential as defined in the bundle. |
| credentials.source | true | Specifies how the credential should be resolved. Must have only one child property:<br/> secret, value, env, path, or command |
[cs-schema]: /schema/v1/credential-set.schema.json
[cs-schema]: https://raw.githubusercontent.com/getporter/porter/main/pkg/schema/credential-set.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ parameters:
| parameters.name | true | The name of the parameter as defined in the bundle. |
| parameters.source | true | Specifies how the parameter should be resolved. Must have only one child property:<br/> secret, value, env, path, or command |
[ps-schema]: /schema/v1/parameter-set.schema.json
[ps-schema]: https://raw.githubusercontent.com/getporter/porter/main/pkg/schema/parameter-set.schema.json
2 changes: 1 addition & 1 deletion docs/content/references/file-formats/plugins/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ plugins:
| plugins.<pluginName>.mirror | false | The mirror of official Porter assets. |
[plugins-schema]: /schema/v1/plugins.schema.json
[plugins-schema]: https://raw.githubusercontent.com/getporter/porter/main/pkg/schema/plugins.schema.json
4 changes: 2 additions & 2 deletions docs/content/security-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ But by default, that foot gun is disabled.
# See Also

* [Distribute Bundles](/distribute-bundles/)
* [Airgapped Deployments](/administrators/airgap/)
* [Airgapped Deployments](/references/examples/airgap/)
* [Blog: Upgrade your plugins to securely store sensitive data](/blog/persist-sensitive-data-safely/)

[credential sets]: /credentials/#credential-sets
[credential sets]: /introduction/intro-credentials/#credential-sets
[secrets plugins]: /plugins/types/#secrets
2 changes: 1 addition & 1 deletion docs/content/troubleshooting/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ With any porter error, it can really help to re-run the command again with the `

## Examine Previous Logs

Porter [saves the logs](/operators/logs/) when a bundle is executed. Comparing the logs
Porter [saves the logs](/operations/view-logs/) when a bundle is executed. Comparing the logs
from a failing run to those from a successful run may assist with
troubleshooting.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/wiring.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ install:
mariadb.enabled: false
```

For more information on how dependencies are handled, refer to the [dependencies](/dependencies) documentation.
For more information on how dependencies are handled, refer to the [dependencies](/development/working-with-dependencies/) documentation.

## Combining References

Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
command = "go run mage.go -v Docs"

[build.environment]
HUGO_VERSION = "0.115.4"
HUGO_VERSION = "0.117.0"
GO_VERSION = "1.20"

[context.branch-deploy]
Expand Down
Loading

0 comments on commit 0114296

Please sign in to comment.