### Install Pluto with Homebrew Source: https://github.com/fairwindsops/pluto/blob/master/docs/installation.md Install the Pluto binary using the FairwindsOps Homebrew tap. ```bash brew install FairwindsOps/tap/pluto ``` -------------------------------- ### Install Pluto with Scoop (Windows) Source: https://github.com/fairwindsops/pluto/blob/master/docs/installation.md Install the Pluto binary on Windows using Scoop. Note: This is community-maintained. ```bash scoop install pluto ``` -------------------------------- ### Install Pre-commit Hooks Source: https://github.com/fairwindsops/pluto/blob/master/docs/contributing/guide.md Install pre-commit hooks for the repository to ensure code quality and consistency before committing changes. ```bash pre-commit install ``` -------------------------------- ### Install Pluto via Homebrew, asdf, or direct binary Source: https://context7.com/fairwindsops/pluto/llms.txt Instructions for installing Pluto using package managers like Homebrew and asdf, or by downloading binaries. Includes verification steps using cosign for release checksums and Docker images. ```bash # Homebrew (macOS/Linux) brew install FairwindsOps/tap/pluto ``` ```bash # asdf asdf plugin-add pluto asdf install pluto latest asdf local pluto latest ``` ```bash # Scoop (Windows) scoop install pluto ``` ```bash # Verify a signed release checksum (using cosign) cosign verify-blob checksums.txt \ --signature=checksums.txt.sig \ --key https://artifacts.fairwinds.com/cosign.pub ``` ```bash # Verify the Docker image cosign verify us-docker.pkg.dev/fairwinds-ops/oss/pluto:v5.19.0 \ --key https://artifacts.fairwinds.com/cosign.pub ``` -------------------------------- ### Install Pluto with asdf Source: https://github.com/fairwindsops/pluto/blob/master/docs/installation.md Use these commands to add the Pluto plugin to asdf, list available versions, install a specific version, and set it as the local version. ```bash asdf plugin-add pluto asdf list-all pluto asdf install pluto asdf local pluto ``` -------------------------------- ### Get Application URL with ClusterIP and Port-Forward Source: https://github.com/fairwindsops/pluto/blob/master/e2e/tests/assets/chart/templates/NOTES.txt This snippet shows how to access a ClusterIP service by setting up port-forwarding. It retrieves the pod name and then echoes a local URL, instructing the user to use port-forwarding. ```bash export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "helm3chart.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 ``` -------------------------------- ### Get Application URL with LoadBalancer Source: https://github.com/fairwindsops/pluto/blob/master/e2e/tests/assets/chart/templates/NOTES.txt This snippet provides instructions and commands to get the application URL for LoadBalancer services. It notes that it may take time for the IP to be available and suggests monitoring the service status. ```bash NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "helm3chart.fullname" . }}' export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "helm3chart.fullname" . }} --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}") echo http://$SERVICE_IP:{{ .Values.service.port }} ``` -------------------------------- ### Check Helm Charts Locally Source: https://github.com/fairwindsops/pluto/blob/master/docs/quickstart.md Pipe the output of `helm template` to Pluto to check local Helm chart definitions for deprecated API versions before deployment. This requires Helm to be installed locally. ```bash $ helm template e2e/tests/assets/helm3chart | pluto detect - ``` -------------------------------- ### Get Application URL with Ingress Source: https://github.com/fairwindsops/pluto/blob/master/e2e/tests/assets/chart/templates/NOTES.txt This snippet generates the application URL when Ingress is enabled. It iterates through configured hosts and paths to construct the full URL. ```go-template {{- if .Values.ingress.enabled }} {{- range $host := .Values.ingress.hosts }} {{- range .paths }} http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} {{- end }} {{- end }} {{- end }} ``` -------------------------------- ### Get Application URL with NodePort Source: https://github.com/fairwindsops/pluto/blob/master/e2e/tests/assets/chart/templates/NOTES.txt This snippet retrieves the application URL for services of type NodePort. It exports the NodePort and Node IP to environment variables and then echoes the URL. ```bash export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "helm3chart.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT ``` -------------------------------- ### Targeting Specific Kubernetes Versions Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Specify the target Kubernetes version for Pluto scans using the --target-versions flag. The version must start with 'v'. ```shell $ pluto detect-helm --target-versions k8s=v1.15.0 No output to display $ echo $? 0 ``` -------------------------------- ### Update Pluto Image Registry Source: https://github.com/fairwindsops/pluto/blob/master/README.md Starting with v5.24.0, Pluto images have moved to a new registry. Update your references to use the new path. Immutable tags are enforced, so use full version tags or pin by digest. ```diff - quay.io/fairwinds/pluto: + us-docker.pkg.dev/fairwinds-ops/oss/pluto: ``` -------------------------------- ### Build Pluto Binary Source: https://github.com/fairwindsops/pluto/blob/master/docs/contributing/guide.md Build the Pluto binary locally using the provided Makefile. Ensure you have a Go 1.13+ environment set up. ```bash make build ``` -------------------------------- ### Verify Docker Image with Cosign Source: https://github.com/fairwindsops/pluto/blob/master/docs/installation.md Verify the Pluto Docker image signature using cosign and the provided public key. ```bash cosign verify us-docker.pkg.dev/fairwinds-ops/oss/pluto:v5 --key https://artifacts.fairwinds.com/cosign.pub ``` -------------------------------- ### Verify Checksums with Cosign Source: https://github.com/fairwindsops/pluto/blob/master/docs/installation.md Verify the integrity of the checksums file using cosign and the provided public key. ```bash cosign verify-blob checksums.txt --signature=checksums.txt.sig --key https://artifacts.fairwinds.com/cosign.pub ``` -------------------------------- ### Configure Pluto via Environment Variables Source: https://context7.com/fairwindsops/pluto/llms.txt Set Pluto's CLI options using environment variables prefixed with `PLUTO_`. This is useful for CI/CD environments or customizing behavior without modifying scripts. ```bash # Equivalent to --target-versions k8s=v1.25.0 export PLUTO_TARGET_VERSIONS="k8s=v1.25.0" # Equivalent to --ignore-deprecations export PLUTO_IGNORE_DEPRECATIONS="true" # Equivalent to --only-show-removed export PLUTO_ONLY_SHOW_REMOVED="true" # Equivalent to --output json export PLUTO_OUTPUT="json" # Equivalent to --additional-versions /path/to/versions.yaml export PLUTO_ADDITIONAL_VERSIONS="/path/to/custom-versions.yaml" # Equivalent to --columns NAMESPACE,NAME,KIND export PLUTO_COLUMNS="NAMESPACE,NAME,KIND" # Equivalent to --components k8s,istio export PLUTO_COMPONENTS="k8s,istio" # Equivalent to --no-headers export PLUTO_NO_HEADERS="true" ``` -------------------------------- ### Detect All Resources in Cluster Source: https://context7.com/fairwindsops/pluto/llms.txt Run this command against a staging or production cluster to identify all Helm releases and live resources that might break during a Kubernetes version upgrade. ```bash pluto detect-all-in-cluster ``` -------------------------------- ### Detect Deprecated API Resources in Live Cluster Source: https://context7.com/fairwindsops/pluto/llms.txt Inspects live Kubernetes objects for deprecated apiVersions using the discovery API and the `kubectl.kubernetes.io/last-applied-configuration` annotation. Use the `-owide` flag for a detailed view. ```bash # Detect deprecated API resources in the active cluster $ pluto detect-api-resources -owide ``` ```bash # Restrict to a specific namespace $ pluto detect-api-resources -n production ``` ```bash # Use a specific kube context $ pluto detect-api-resources --kube-context my-prod-cluster ``` -------------------------------- ### Run All In-Cluster Detection Methods Source: https://context7.com/fairwindsops/pluto/llms.txt Combines `detect-helm` and `detect-api-resources` for a comprehensive scan of deprecated API versions in a running cluster. Redirect stderr to `/dev/null` to suppress informational messages. ```bash # Detect all deprecated resources from both Helm and API resources $ pluto detect-all-in-cluster -owide 2>/dev/null ``` ```bash # Restrict to a specific namespace $ pluto detect-all-in-cluster -n my-namespace ``` -------------------------------- ### Run Pluto Tests Source: https://github.com/fairwindsops/pluto/blob/master/docs/contributing/guide.md Execute the test suite for Pluto and generate a coverage report using the Makefile. This helps ensure code correctness and identifies areas for improvement. ```bash make test ``` -------------------------------- ### YAML Output Format for Detection Commands Source: https://context7.com/fairwindsops/pluto/llms.txt Generate output in YAML format for detection commands. Useful for readability and integration with other tools. ```bash # YAML output $ pluto detect-files -d ./manifests -oyaml ``` -------------------------------- ### Testing Custom Version Checks Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Verify custom version checks by listing versions with the --additional-versions flag. ```shell $ pluto list-versions -f new.yaml KIND NAME DEPRECATED IN REMOVED IN REPLACEMENT COMPONENT AnotherCRD someother/v1beta1 v1.9.0 v1.16.0 apps/v1 custom ``` -------------------------------- ### Detect files in Markdown with custom columns Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Generate a Markdown table with specific columns for detected files. Use quotes for column names with spaces. ```shell $ pluto detect-files -o markdown --columns NAMESPACE,NAME,DEPRECATED IN,DEPRECATED,REPLACEMENT,VERSION,KIND,COMPONENT,FILEPATH | NAME | NAMESPACE | KIND | VERSION | REPLACEMENT | DEPRECATED | DEPRECATED IN | COMPONENT | FILEPATH | |---------------|-----------------|------------|--------------------|-------------|------------|---------------|-----------|--------------| | some name one | pluto-namespace | Deployment | extensions/v1beta1 | apps/v1 | true | v1.9.0 | foo | path-to-file | | some name two | | Deployment | extensions/v1beta1 | apps/v1 | true | v1.9.0 | foo | | ``` -------------------------------- ### Detect All In-Cluster Resources (Helm and API) Source: https://github.com/fairwindsops/pluto/blob/master/docs/quickstart.md Combines detection of both Helm releases and API resources within the cluster. This provides a comprehensive view of deprecated API usage across all deployed resources. ```bash $ pluto detect-all-in-cluster -o wide 2>/dev/null ``` -------------------------------- ### Detect files in Markdown output mode Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Generate a Markdown table of detected files, showing resource details. ```shell $ pluto detect-files -o markdown | NAME | NAMESPACE | KIND | VERSION | REPLACEMENT | DEPRECATED | DEPRECATED IN | REMOVED | REMOVED IN | |-----------|----------------|------------|--------------------|-------------|------------|---------------|---------|------------| | utilities | | Deployment | extensions/v1beta1 | apps/v1 | true | v1.9.0 | true | v1.16.0 | | utilities | json-namespace | Deployment | extensions/v1beta1 | apps/v1 | true | v1.9.0 | true | v1.16.0 | | utilities | yaml-namespace | Deployment | extensions/v1beta1 | apps/v1 | true | v1.9.0 | true | v1.16.0 | ``` -------------------------------- ### Detect Helm Resources Source: https://context7.com/fairwindsops/pluto/llms.txt Use this command to identify potential issues with Helm releases before a Kubernetes version upgrade. ```bash pluto detect-helm ``` -------------------------------- ### Custom Columns Output Format Source: https://context7.com/fairwindsops/pluto/llms.txt Select and display specific columns in the output for detection commands. Use `--columns` followed by a comma-separated list of desired column names. ```bash # Custom columns $ pluto detect-helm -ocustom --columns NAMESPACE,NAME,KIND,VERSION ``` -------------------------------- ### Define and Use Custom Versions with Pluto Source: https://context7.com/fairwindsops/pluto/llms.txt Extend Pluto's deprecation list by creating a custom YAML file for third-party components. Use the `-f` flag to apply this file during detection and listing. ```bash # Create a custom versions file $ cat > /tmp/custom-versions.yaml < pkg/api/versions.yaml ``` -------------------------------- ### Detect Files with YAML Output Source: https://context7.com/fairwindsops/pluto/llms.txt Use this command to detect files in a directory and output the results in YAML format. CLI flags like `--output` take precedence over environment variables. ```bash pluto detect-files -d ./manifests --output yaml # overrides PLUTO_OUTPUT ``` -------------------------------- ### Detect Helm resources with custom columns Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Specify custom columns to display when detecting Helm resources. Columns with spaces require escaping or quoting. ```shell $ pluto detect-helm -ocustom --columns NAMESPACE,NAME NAME NAMESPACE cert-manager/cert-manager-webhook cert-manager ``` -------------------------------- ### Detect Helm resources in YAML output mode Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Output detected Helm resources in YAML format for human-readable inspection. ```yaml items: - name: cert-manager/cert-manager-webhook namespace: cert-manager api: version: admissionregistration.k8s.io/v1beta1 kind: MutatingWebhookConfiguration deprecated-in: v1.16.0 removed-in: v1.19.0 replacement-api: admissionregistration.k8s.io/v1 component: k8s deprecated: true removed: false target-versions: cert-manager: v0.15.1 istio: v1.6.0 k8s: v1.16.0 ``` -------------------------------- ### Detect Files in a Directory Source: https://github.com/fairwindsops/pluto/blob/master/docs/quickstart.md Use this command to scan a local directory for Kubernetes manifests containing deprecated API versions. It helps identify resources that need updating before a Kubernetes version upgrade. ```bash $ pluto detect-files -d pkg/finder/testdata ``` -------------------------------- ### Detect API Resources In-Cluster Source: https://github.com/fairwindsops/pluto/blob/master/docs/quickstart.md Scan all API resources currently running in your cluster for deprecated versions. This command provides a cluster-wide overview of API usage. ```bash $ pluto detect-api-resources -owide ``` -------------------------------- ### Detect Helm resources in JSON output mode Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Output detected Helm resources in JSON format. Pipe the output to 'jq' for pretty-printing and easier parsing. ```shell $ pluto detect-helm -ojson | jq . { "items": [ { "name": "cert-manager/cert-manager-webhook", "namespace": "cert-manager", "api": { "version": "admissionregistration.k8s.io/v1beta1", "kind": "MutatingWebhookConfiguration", "deprecated-in": "v1.16.0", "removed-in": "v1.19.0", "replacement-api": "admissionregistration.k8s.io/v1", "component": "k8s" }, "deprecated": true, "removed": false } ], "target-versions": { "cert-manager": "v0.15.1", "istio": "v1.6.0", "k8s": "v1.16.0" } } ``` -------------------------------- ### Markdown Table Output Format Source: https://context7.com/fairwindsops/pluto/llms.txt Display detection results as a Markdown table. Suitable for documentation or reports. ```bash # Markdown table output $ pluto detect-files -d ./manifests -o markdown ``` -------------------------------- ### Detect Helm resources in CSV with custom columns Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Generate CSV output with a specific subset of columns. Ensure columns with spaces are quoted. ```shell $ pluto detect-helm -o csv --columns "KIND,NAMESPACE,NAME,VERSION,REPLACEMENT" KIND,NAMESPACE,NAME,VERSION,REPLACEMENT Deployment,pluto-namespace,deploy1,extensions/v1beta1,apps/v1 Deployment,other-namespace,deploy1,extensions/v1beta1,apps/v1 ``` -------------------------------- ### Specifying Kube Context or Kubeconfig Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Use --kube-context or --kubeconfig flags to specify a particular Kubernetes context or kubeconfig file path for Pluto operations. ```shell --kube-context ``` ```shell --kubeconfig ``` -------------------------------- ### Scan a Directory for Deprecated apiVersions with Pluto Source: https://context7.com/fairwindsops/pluto/llms.txt Use `pluto detect-files` to recursively scan local directories for Kubernetes manifests with deprecated or removed apiVersions. Supports filtering by removal status, targeting specific Kubernetes versions, and CI integration via exit codes. ```bash # Scan a directory of manifests $ pluto detect-files -d ./k8s-manifests ``` ```bash # Scan the current working directory (default) $ pluto detect-files ``` ```bash # Show only apiVersions that are fully removed (not just deprecated) $ pluto detect-files -d ./manifests --only-show-removed ``` ```bash # Target a specific Kubernetes version to check against $ pluto detect-files -d ./manifests --target-versions k8s=v1.25.0 ``` ```bash # Exit code for CI - check if any removed versions found $ pluto detect-files -d ./manifests $ echo "Exit code: $?" # Exit code: 3 (removed apiVersions found) ``` ```bash # Ignore deprecations, only fail on removals $ pluto detect-files -d ./manifests --ignore-deprecations ``` -------------------------------- ### Detect Deprecated API Versions in Files Source: https://github.com/fairwindsops/pluto/blob/master/docs/README.md Use this command to scan local files for deprecated Kubernetes API versions. Specify the directory to scan using the -d flag. ```bash pluto detect-files -d pkg/finder/testdata ``` -------------------------------- ### Check a Single File or stdin for Deprecated apiVersions Source: https://context7.com/fairwindsops/pluto/llms.txt Use `pluto detect` to check specific manifest files or standard input for deprecated apiVersions. This command is suitable for multi-document YAML files and piping output from `helm template`. ```bash # Check a specific manifest file $ pluto detect my-deployment.yaml ``` ```bash # Pipe helm template output into pluto $ helm template ./my-chart | pluto detect - ``` ```bash # Check a multi-document YAML file $ pluto detect all-resources.yaml ``` ```bash # Check stdin from a file $ cat deprecated-ingress.yaml | pluto detect - ``` -------------------------------- ### List All Known Deprecated API Versions Source: https://context7.com/fairwindsops/pluto/llms.txt Outputs a comprehensive list of deprecated and removed API versions known to Pluto, including deprecation/removal versions, replacements, and associated components. Supports various output formats. ```bash # List in tabular format $ pluto list-versions ``` ```bash # Output as JSON $ pluto list-versions -ojson | jq '.["deprecated-versions"][] | select(.component == "k8s")' ``` ```bash # Output as YAML $ pluto list-versions -oyaml ``` ```bash # Include custom versions from a file $ pluto list-versions -f /tmp/my-custom-versions.yaml ``` -------------------------------- ### GitHub Actions Integration for Pluto Source: https://context7.com/fairwindsops/pluto/llms.txt Integrate Pluto into your GitHub Actions workflows to automatically check for deprecated Kubernetes apiVersions in your manifests and Helm charts. ```yaml # .github/workflows/pluto.yml name: Check for deprecated Kubernetes apiVersions on: [pull_request] jobs: pluto: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Download Pluto uses: FairwindsOps/pluto/github-action@master with: IMAGE_TAG: v5.19.0 # pin to a specific version - name: Detect deprecated apiVersions in manifests run: pluto detect-files -d ./k8s - name: Detect deprecated apiVersions in Helm charts run: | helm template ./charts/my-app | pluto detect - - name: Full detection with JSON output run: | pluto detect-files -d ./k8s -ojson | jq '.items // [] | length' ``` -------------------------------- ### Detect Deprecated apiVersions in Live Helm Releases Source: https://context7.com/fairwindsops/pluto/llms.txt Use `pluto detect-helm` to inspect live Helm releases in the Kubernetes cluster for resources deployed with deprecated apiVersions. Supports both Helm 2 and Helm 3, and allows filtering by namespace. ```bash # Detect deprecated helm releases in the current cluster (default output) $ pluto detect-helm ``` ```bash # Wide output showing deprecation and removal versions $ pluto detect-helm -owide ``` ```bash # Restrict to a specific namespace $ pluto detect-helm -n cert-manager ``` -------------------------------- ### Environment Variables for Pluto Flags Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Configure Pluto flags using environment variables prefixed with PLUTO_ and using underscores instead of hyphens. Command-line options take precedence. ```shell PLUTO_IGNORE_DEPRECATIONS ``` ```shell PLUTO_IGNORE_REMOVALS ``` ```shell PLUTO_TARGET_VERSIONS ``` ```shell PLUTO_ONLY_SHOW_REMOVED ``` ```shell PLUTO_ADDITIONAL_VERSIONS ``` ```shell PLUTO_OUTPUT ``` ```shell PLUTO_COLUMNS ``` ```shell PLUTO_COMPONENTS ``` ```shell PLUTO_NO_HEADERS ``` -------------------------------- ### CI Pipeline Exit Codes and Flags Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Understand Pluto's exit codes for CI/CD integration and learn how to bypass specific checks using flags. ```shell --ignore-deprecations Ignore the default behavior to exit 2 if deprecated apiVersions are found. --ignore-removals Ignore the default behavior to exit 3 if removed apiVersions are found. --ignore-unavailable-replacements Ignore the default behavior to exit 4 if deprecated but unavailable apiVersions are found. ``` -------------------------------- ### Detect Files in CI Pipeline Source: https://context7.com/fairwindsops/pluto/llms.txt In CI pipelines, run this command on pull requests modifying Kubernetes manifests or Helm charts. The process will be blocked if any removed apiVersions are detected (exit code 3). ```bash pluto detect-files ``` -------------------------------- ### Use Pluto in GitHub Actions Source: https://github.com/fairwindsops/pluto/blob/master/README.md Integrate Pluto into your GitHub workflows to automatically detect deprecated Kubernetes API versions. Ensure you use the correct action tag for the desired Pluto version. ```yaml - name: Download Pluto uses: FairwindsOps/pluto/github-action@master - name: Use pluto run: | pluto detect-files -d pkg/finder/testdata ``` -------------------------------- ### Detect Helm resources in wide output mode Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Use '-o wide' to display additional information about deprecated or removed API versions when detecting Helm resources. ```shell $ pluto detect-helm -owide NAME NAMESPACE KIND VERSION REPLACEMENT DEPRECATED DEPRECATED IN REMOVED REMOVED IN cert-manager/cert-manager-webhook cert-manager MutatingWebhookConfiguration admissionregistration.k8s.io/v1beta1 admissionregistration.k8s.io/v1 true v1.16.0 false v1.19.0 ``` -------------------------------- ### Detect Helm resources in CSV output mode Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Output detected Helm resources in CSV format. This is useful for importing into spreadsheets or other data analysis tools. ```shell $ pluto detect-helm -o csv NAME,NAMESPACE,KIND,VERSION,REPLACEMENT,DEPRECATED,DEPRECATED IN,REMOVED,REMOVED IN deploy1,pluto-namespace,Deployment,extensions/v1beta1,apps/v1,true,v1.9.0,true,v1.16.0 deploy1,other-namespace,Deployment,extensions/v1beta1,apps/v1,true,v1.9.0,true,v1.16.0 ``` -------------------------------- ### Control Target Versions with Pluto Source: https://context7.com/fairwindsops/pluto/llms.txt Specify the Kubernetes or component version Pluto checks deprecations against using the `--target-versions` flag. This is crucial for upgrade planning. ```bash # Default target is v1.22.0; override to v1.25.0 for a specific upgrade $ pluto detect-helm --target-versions k8s=v1.25.0 # Target multiple components simultaneously $ pluto detect-helm -t k8s=v1.24.0 -t istio=v1.12.0 -t cert-manager=v1.9.0 # Check what's deprecated in v1.15.0 (should show no removals) $ pluto detect-helm --target-versions k8s=v1.15.0 No output to display $ echo $? 0 # Filter by specific components only $ pluto detect-files -d ./manifests --components k8s,cert-manager ``` -------------------------------- ### Detect Helm Releases with Specific Kubeconfig Source: https://context7.com/fairwindsops/pluto/llms.txt Use this command to detect deprecated API versions in Helm releases, specifying a custom kubeconfig file and context. ```bash $ pluto detect-helm --kubeconfig ~/.kube/my-cluster.yaml --kube-context staging ``` -------------------------------- ### CircleCI Orb Integration for Pluto Source: https://context7.com/fairwindsops/pluto/llms.txt Incorporate Pluto into your CircleCI pipelines using the official orb to automate the detection of deprecated Kubernetes apiVersions. ```yaml # .circleci/config.yml version: 2.1 orbs: pluto: fairwinds/pluto@1.0.0 workflows: check-deprecations: jobs: - pluto/detect: directory: k8s/ - pluto/detect_files: directory: ./manifests ``` -------------------------------- ### JSON Output Format for Detection Commands Source: https://context7.com/fairwindsops/pluto/llms.txt Pipe detection command output to `jq` for JSON processing. This format provides structured data about deprecated API versions. ```bash # JSON output (pipeable to jq) $ pluto detect-helm -ojson | jq . ``` -------------------------------- ### CI Pipeline Integration with Pluto Exit Codes Source: https://context7.com/fairwindsops/pluto/llms.txt Utilize Pluto's exit codes (0-4) to gate CI pipelines based on the severity of detected issues. Handle specific exit codes to provide informative failure messages. ```bash # Exit codes: # 0 = no issues # 1 = runtime error # 2 = deprecated apiVersion found # 3 = removed apiVersion found # 4 = replacement apiVersion unavailable in target version # Example CI pipeline script pluto detect-files -d ./k8s STATUS=$? if [ $STATUS -eq 3 ]; then echo "ERROR: Removed apiVersions found — upgrade will fail!" exit 1 elif [ $STATUS -eq 2 ]; then echo "WARNING: Deprecated apiVersions found — plan migration." fi # Ignore deprecations but still fail on removals $ pluto detect-files -d ./manifests --ignore-deprecations # Ignore both deprecations and removals (useful for reporting-only jobs) $ pluto detect-files -d ./manifests --ignore-deprecations --ignore-removals # Fail only on unavailable replacements $ pluto detect-files -d ./manifests --ignore-unavailable-replacements ``` -------------------------------- ### Adding Custom Version Checks Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Provide a YAML file with custom version checks using the --additional-versions flag. This allows defining custom deprecated and removed API versions. ```yaml target-versions: custom: v1.0.0 deprecated-versions: - version: someother/v1beta1 kind: AnotherCRD deprecated-in: v1.9.0 removed-in: v1.16.0 replacement-api: apps/v1 component: custom ``` -------------------------------- ### Detect Helm Charts In-Cluster (Single Namespace) Source: https://github.com/fairwindsops/pluto/blob/master/docs/quickstart.md Restrict the Helm chart detection to a specific namespace by using the `--namespace` or `-n` flag. This is useful for targeted analysis within a large cluster. ```bash $ pluto detect-helm -n cert-manager -owide ``` -------------------------------- ### Pluto Image Tagging Source: https://github.com/fairwindsops/pluto/blob/master/README.md Use full version tags or pin by SHA256 digest for immutable and signed Pluto images. Floating tags like 'latest' are no longer supported. ```shell us-docker.pkg.dev/fairwinds-ops/oss/pluto:v.. ``` ```shell us-docker.pkg.dev/fairwinds-ops/oss/pluto@sha256: ``` -------------------------------- ### Showing Only Removed API Versions Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Use the --only-show-removed flag to filter results to only include removed API versions. ```shell --only-show-removed Ignore the default behavior to exit 3 if removed apiVersions are found. ``` -------------------------------- ### CSV Output Format Source: https://context7.com/fairwindsops/pluto/llms.txt Generate output in CSV format for easy parsing and analysis in spreadsheets or data processing tools. ```bash # CSV output $ pluto detect-helm -o csv ``` -------------------------------- ### Filtering Scans by Component Source: https://github.com/fairwindsops/pluto/blob/master/docs/advanced.md Use the --components flag to limit Pluto scans to specific components. ```shell --components ``` -------------------------------- ### Detect Helm Charts In-Cluster Source: https://github.com/fairwindsops/pluto/blob/master/docs/quickstart.md Scan Helm releases deployed in your cluster for deprecated API versions. This command helps identify Helm-managed resources that use outdated Kubernetes APIs. ```bash $ pluto detect-helm -owide ``` -------------------------------- ### Update Pluto Versions Source: https://github.com/fairwindsops/pluto/blob/master/docs/contributing/guide.md Use Pluto to update the versions.yaml file by providing a temporary file with new versions and target versions. This ensures parsable and valid versions for easier patching. ```yaml target-versions: other: v1.0.0 deprecated-versions: - version: someother/v1beta1 kind: AnotherCRD deprecated-in: v1.9.0 removed-in: v1.16.0 replacement-api: apps/v1 component: new-component ``` ```bash pluto list-versions -f /tmp/new.yaml -oyaml > versions.yaml ``` -------------------------------- ### Suppress Headers in Output Source: https://context7.com/fairwindsops/pluto/llms.txt Use the `--no-headers` flag to omit header rows from the output of detection commands, useful for cleaner data processing. ```bash # Suppress headers $ pluto detect-files -d ./manifests --no-headers ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.