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

kubesync

v0.1.3

Published

kubesync is a small command line tool that makes it easy to deploy local config files (json and yaml) to ssh-proxied kubernetes cluster.

Downloads

10

Readme

kubesync

kubesync is a small command line tool that makes it easy to deploy local config files (json and yaml) to ssh-proxied kubernetes cluster.

Getting Started

Prerequisities

  • NodeJS >= 4.2

Installing

npm i kubesync -g

Now you can type kubesync --help to run it.

Usage

SSH Connection

To use this tool, there must be a proxied ssh connection with kubernetes cluster.

ssh [email protected] -L 8080:127.0.0.1:8080

CLI

Usage: kubesync <folder> [options]

Options:

  -h, --help                   output usage information
  -V, --version                output the version number
  -d, --dry-run                run the script without any changes on remote k8s for test purposes
  -e, --ensure-all-running     watch related pods after execution and wait until they're in `running` state

Example

Go to the folder that contains all k8s cluster config files, and run:

kubesync .

How does it work?

If you run the command above, kubesync will scan all the files in current folder (.) recursively with .json and .yaml extension. Then it will parse these configs to determine resource type. Currently just ReplicationController and Service kinds are supported.

These replication controllers and services will be compared to remote ones.

  • If there is no remote resource with same metadata.name and kind: It will create new resource.
  • If there is a remote resource with same metadata.name and kind: It will compare some fields. If they're not matched, updates the remote resource. If they're matched, does nothing.

Fields to check for ReplicationControllers:

  • spec.template.spec.containers[].image
  • spec.template.spec.containers[].command
  • spec.template.spec.containers[].env

Fields to check for Services:

  • spec.ports[].port
  • spec.ports[].targetPort
  • spec.selector.name

Development

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Clone this repo

git clone https://github.com/signalive/kubesync.git

Install dependencies

npm i -g

Now you can call kubesync globally. Into order to update global kubesync for development purposes, run:

npm link