Skip to content

Conversation

Copy link

Copilot AI commented Aug 10, 2025

Throughout the codebase and documentation, the terms "manifest" and "resource" were used interchangeably, causing confusion about their distinct meanings. This PR clarifies and corrects the terminology to align with Kubernetes conventions:

  • manifest = a file that defines any number of Kubernetes resources
  • resource = a single document of a nested data structure that represents a Kubernetes API resource

Key Changes

Function Parameters & Variable Names:

  • Updated resource_locator(manifest: Resource)resource_locator(resource: Resource)
  • Updated is_cluster_scoped_resource(manifest: Resource)is_cluster_scoped_resource(resource: Resource)
  • Updated kubectl.apply(manifests: ResourceList)kubectl.apply(resources: ResourceList)
  • Updated kubectl.diff(manifests: ResourceList)kubectl.diff(resources: ResourceList)
  • Fixed NylResource.load(), maybe_load(), matches() parameter names from manifest to resource

Docstrings & Comments:

  • Generator docstrings now correctly refer to "generated Kubernetes resources" instead of "generated Kubernetes manifests"
  • PostProcessor documentation clarified to distinguish between processing resources vs. manifest files
  • CLI help text updated to refer to "rendered resources" instead of "rendered manifests"

Documentation:

  • Fixed references in docs/content/reference/templating/inlining/postprocessor.md
  • Updated ArgoCD-related documentation in docs/content/reference/templating/secrets.md

Examples

Before:

def resource_locator(manifest: Resource) -> str:
    """Create a string that contains the apiVersion, kind, namespace and name of a Kubernetes resource"""
    return f"{manifest['apiVersion']}/{manifest['kind']}/..."

After:

def resource_locator(resource: Resource) -> str:
    """Create a string that contains the apiVersion, kind, namespace and name of a Kubernetes resource"""
    return f"{resource['apiVersion']}/{resource['kind']}/..."

The changes maintain full backward compatibility while providing clearer, more consistent terminology throughout the codebase. All CLI functionality and existing behavior is preserved.

Fixes #59.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: curl -LsSf REDACTED (dns block)
  • k3s.host.local
    • Triggering command: ssh -p 22 root@k3s.host.local cat /etc/rancher/k3s/k3s.yaml (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Author

Copilot AI commented Aug 10, 2025

@NiklasRosenstein 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI and others added 3 commits August 10, 2025 13:04
Co-authored-by: NiklasRosenstein <1318438+NiklasRosenstein@users.noreply.github.com>
Co-authored-by: NiklasRosenstein <1318438+NiklasRosenstein@users.noreply.github.com>
Co-authored-by: NiklasRosenstein <1318438+NiklasRosenstein@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix terminology around manifests and resources Fix terminology around manifests and resources Aug 10, 2025
Copilot AI requested a review from NiklasRosenstein August 10, 2025 13:17
Load a Nyl resource from a manifest. If called directly on `NylResource`, this will deserialize into the
appropriate subclass based on the `kind` field in the manifest. If the method is instead called on a subclass
directly, the subclass will be used to deserialize the manifest.
Load a Nyl resource from a resource document. If called directly on `NylResource`, this will deserialize into the
Copy link
Collaborator

Choose a reason for hiding this comment

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

@copilot A "resource document" is a "manifest"

Copy link
Author

Choose a reason for hiding this comment

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

You're absolutely right. I've reverted the docstring to use "manifest" instead of "resource document" since they are equivalent in this context. The parameter name remains resource which correctly represents the single resource being processed. Fixed in 672e786.

…y are equivalent

Co-authored-by: NiklasRosenstein <1318438+NiklasRosenstein@users.noreply.github.com>
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.

Fix terminology around manifests and resources

2 participants