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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cdk8s-debore

v0.1.1

Published

Run your apps on Kubernetes cluster without bored YAMLing

Downloads

6

Readme

cdk8s-debore

Run your apps on Kubernetes cluster without bored YAMLing, powered by the cdk8s project 🚀

Overview

cdk8s-debore is a cdk8s library which allows you to define your Kubernetes app with just few lines of code.

new DeboredApp(this, 'webapp', {
  image: 'your-image:latest',
  autoScale: true,
  ingress: IngressType.NGINX_INGRESS
});

Then the Kubernetes manifests created by cdk8s synth command will have Kubernetes resources such as Deployment, Service, HorizontalPodAutoscaler, Ingress, as follows.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app-webapp-deployment-deployment-d67b425c
  namespace: default
spec:
  selector:
    matchLabels:
      app: myappwebapp4BD95A2A
  template:
    metadata:
      labels:
        app: myappwebapp4BD95A2A
    spec:
      containers:
        - image: your-image:latest
          imagePullPolicy: Always
          name: app
          ports:
            - containerPort: 8080
          resources:
            limits:
              cpu: 400m
              memory: 512Mi
            requests:
              cpu: 200m
              memory: 256Mi
---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: my-app-webapp-deployment-hpa-bd8107fd
  namespace: default
spec:
  maxReplicas: 10
  metrics:
    - resource:
        name: cpu
        target:
          averageUtilization: 85
          type: Utilization
      type: Resource
    - resource:
        name: memory
        target:
          averageUtilization: 75
          type: Utilization
      type: Resource
  minReplicas: 1
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-app-webapp-deployment-deployment-d67b425c
---
apiVersion: v1
kind: Service
metadata:
  name: my-app-webapp-exposable-service-d6a35671
  namespace: default
spec:
  ports:
    - port: 8080
      targetPort: 80
  selector:
    app: myappwebapp4BD95A2A
  type: ClusterIP
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
  name: my-app-webapp-exposable-ingress-c350957f
  namespace: default
spec:
  rules:
    - http:
        paths:
          - backend:
              serviceName: my-app-webapp-exposable-service-d6a35671
              servicePort: 80
            path: /my-app-webapp-deployment-deployment-d67b425c

Installation

cdk8s supports TypeScript and Python at this point, so as cdk8s-debore.

We'd recommend to walk through the cdk8s Getting Started guide before using this library, if you're very new to cdk8s world.

TypeScript

Use npm or yarn to install.

$ npm install -s cdk8s-debore

or

$ yarn add cdk8s-debore

Python

$ pip install cdk8s-debore

Contribution

  1. Fork (https://github.com/toricls/cdk8s-debore/fork)

  2. Bootstrap the repo:

    npx projen   # generates package.json and friends
    yarn install # installs dependencies
  3. Development scripts: |Command|Description |-|- |yarn compile|Compiles typescript => javascript |yarn watch|Watch & compile |yarn test|Run unit test & linter through jest |yarn test -u|Update jest snapshots |yarn run package|Creates a dist with packages for all languages. |yarn build|Compile + test + package |yarn bump|Bump version (with changelog) based on conventional commits |yarn release|Bump + push to master

  4. Create a feature branch

  5. Commit your changes

  6. Rebase your local changes against the master branch

  7. Create a new Pull Request (use conventional commits for the title please)

Licence

Apache License, Version 2.0

Author

Tori