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 package reference docs #2046

Merged
5 commits merged into from
Oct 24, 2023
Merged

Add package reference docs #2046

5 commits merged into from
Oct 24, 2023

Conversation

ghost
Copy link

@ghost ghost commented Oct 20, 2023

Add documentation for using container image references in kustomize step.

@ghost ghost force-pushed the yihao/kustomize-package-reference branch from 32373d0 to 7cbe1a0 Compare October 20, 2023 03:49
Copy link
Contributor

@johnsimons johnsimons left a comment

Choose a reason for hiding this comment

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

Added a few comments and suggestions


## Referencing Container images

Since v2.0.1, you are able to add container images as package references directly from the Kustomize step. Image references added in this way can be used via [variable substitutions](/docs/projects/variables/variable-substitutions).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Since v2.0.1, you are able to add container images as package references directly from the Kustomize step. Image references added in this way can be used via [variable substitutions](/docs/projects/variables/variable-substitutions).
From v2.0.1, you are able to add container images as package references directly from the Kustomize step. Image references added in this way can be used via [reference package variables](/docs/projects/variables/system-variables#reference-package-variables).

![Reference a package](/docs/deployments/kubernetes/kustomize/reference-a-package.png)
:::

You will then be able to select the version of this container image at release creation time. You can use the referenced `nginx` container image in a YAML file as a variable:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
You will then be able to select the version of this container image at release creation time. You can use the referenced `nginx` container image in a YAML file as a variable:
You will then be able to select the version of this container image at release creation time. You can use the referenced `nginx` container image in your `kustomization.yaml` file using the following syntax:


You will then be able to select the version of this container image at release creation time. You can use the referenced `nginx` container image in a YAML file as a variable:

```yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

# ~/myApp/kustomization.yaml
resources:
- deployment.yaml

images:
- name: nginx
   newTag: #{Octopus.Action.Package[nginx].PackageVersion}

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this may be a better example, more the kustomize way 😉

Copy link
Contributor

@johnsimons johnsimons left a comment

Choose a reason for hiding this comment

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

LGTM, but there is a conflict

@ghost ghost merged commit a1790f0 into main Oct 24, 2023
4 checks passed
@ghost ghost deleted the yihao/kustomize-package-reference branch October 24, 2023 22:33
This pull request was closed.
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.

1 participant