npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ruivalim/kubernetes-apply

v0.1.4

Published

A custom Backstage scaffolder action to apply any Kubernetes resource.

Downloads

11

Readme

Kubernetes Apply for Backstage

A custom Backstage scaffolder action that enables server-side apply of Kubernetes manifests.

What

This action allows you to apply any Kubernetes resource directly from Backstage templates. It uses the Kubernetes server-side apply mechanism to create or update resources in your cluster.

Why

Use this action when you need to provision Kubernetes resources as part of your Backstage software templates. Common use cases include:

  • Creating ArgoCD Applications for GitOps deployments
  • Provisioning namespaces and resource quotas
  • Setting up RBAC resources
  • Deploying any custom Kubernetes resource as part of template scaffolding

Installation

Add the package to your Backstage backend:

yarn add --cwd packages/backend @ruivalim/kubernetes-apply

Register the action in your scaffolder configuration:

import { createRouter, createBuiltinActions } from '@backstage/plugin-scaffolder-backend';
import { kubernetesApply } from '@ruivalim/kubernetes-apply';

export default async function createPlugin(env: PluginEnvironment) {
  const builtInActions = createBuiltinActions({
    integrations: ScmIntegrations.fromConfig(env.config),
    catalogClient: new CatalogClient({ discoveryApi: env.discovery }),
    config: env.config,
    reader: env.reader,
  });

  const actions = [...builtInActions, kubernetesApply()];

  return await createRouter({
    actions,
    catalogClient: new CatalogClient({ discoveryApi: env.discovery }),
    logger: env.logger,
    config: env.config,
    database: env.database,
    reader: env.reader,
  });
}

Usage

Basic Example

Apply a manifest with inline YAML content:

steps:
  - id: apply-namespace
    name: Create Namespace
    action: kubernetes:apply
    input:
      namespaced: false
      manifest: |
        apiVersion: v1
        kind: Namespace
        metadata:
          name: ${{ parameters.namespace }}

Apply from File

Apply a manifest from a file path:

steps:
  - id: apply-deployment
    name: Apply Deployment
    action: kubernetes:apply
    input:
      namespaced: true
      manifestFile: ./kubernetes/deployment.yaml

ArgoCD Application Example

steps:
  - id: create-argocd-app
    name: Create ArgoCD Application
    action: kubernetes:apply
    input:
      namespaced: true
      manifest: |
        apiVersion: argoproj.io/v1alpha1
        kind: Application
        metadata:
          name: ${{ parameters.name }}
          namespace: argocd
        spec:
          project: default
          source:
            repoURL: ${{ parameters.repoUrl }}
            path: manifests
            targetRevision: main
          destination:
            server: https://kubernetes.default.svc
            namespace: ${{ parameters.namespace }}
          syncPolicy:
            automated:
              selfHeal: true
              prune: true

Parameters

manifest (optional)

The YAML content of the Kubernetes manifest to apply. Use this for inline manifest definitions.

manifestFile (optional)

Path to a file containing the Kubernetes manifest to apply. Use this when the manifest is stored in a file.

Note: Provide either manifest or manifestFile, not both.

namespaced (required)

Boolean indicating whether the resource is namespaced or cluster-scoped.

  • Set to true for namespaced resources (Deployment, Service, ConfigMap, etc.)
  • Set to false for cluster-scoped resources (Namespace, ClusterRole, CustomResourceDefinition, etc.)

Requirements

The ServiceAccount running your Backstage application must have sufficient RBAC permissions to create the resources you want to apply. Ensure your cluster configuration grants the necessary permissions.

Supported Resources

This action supports all Kubernetes resources including:

  • Core resources (v1): ConfigMap, Secret, Service, Namespace, etc.
  • Apps resources (apps/v1): Deployment, StatefulSet, DaemonSet, etc.
  • Custom resources: ArgoCD Applications, Crossplane Claims, etc.

The action automatically handles both core API resources (apiVersion: v1) and grouped API resources (apiVersion: apps/v1).