Skip to content

Commit

Permalink
push repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Sceat committed Apr 17, 2020
0 parents commit 460f718
Show file tree
Hide file tree
Showing 10 changed files with 3,654 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
60 changes: 60 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
env:
node: true
es6: true
extends:
- eslint:recommended
- airbnb-base
- adjunct
globals:
Atomics: readonly
SharedArrayBuffer: readonly
parser: babel-eslint
parserOptions:
ecmaVersion: 2020
sourceType: module
ecmaFeatures:
legacyDecorators: true
rules:
indent: ["error", 2, { SwitchCase: 1 }]
linebreak-style:
- error
- unix
quotes: ["warn", "single", { avoidEscape: true }]
semi: 0
comma-dangle:
- warn
- always-multiline
sonarjs/prefer-while: 0
default-case: ["error", { "commentPattern": "^skip\\sdefault" }]
array-bracket-spacing:
- warn
- never
no-await-in-loop: 0
space-before-function-paren:
["warn", { anonymous: "never", named: "never", asyncArrow: "always" }]
func-names: 0
no-param-reassign: ["error", { props: false }]
import/prefer-default-export: 0
no-bitwise: 0
no-console: 0
lines-between-class-members: ["warn", always, { exceptAfterSingleLine: true }]
consistent-return: 0
no-plusplus: 0
arrow-body-style: 2
arrow-parens:
- error
- as-needed
object-curly-newline: ["error", { multiline: true }]
object-curly-spacing:
- error
- always
max-len: ["error", { code: 200 }]
no-empty: ["error", { allowEmptyCatch: true }]
unicorn/no-unreadable-array-destructuring: 0
unicorn/filename-case: ["error", { case: "camelCase" }]
func-style:
- error
- expression
import/no-named-as-default: 0
no-restricted-syntax: 0
camelcase: 0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:13.8-alpine

WORKDIR /app

COPY package.json pnpm-lock.yaml ./
RUN npx pnpm install
COPY . .

CMD npm run start
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Sidy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<h1 align=center>Disco-pod</h1>
<p align=center>
<img src="https://img.shields.io/github/license/Sidy-group/gql-ws-server.svg?style=for-the-badge" />
<a href="https://www.npmjs.com/package/@sidy/gql-ws-server">
<img src="https://img.shields.io/npm/v/@sidy/gql-ws-server.svg?logo=npm&style=for-the-badge" />
</a>
<img src="https://img.shields.io/npm/dw/@sidy/gql-ws-server?logo=npm&style=for-the-badge" />
<img src="https://img.shields.io/github/workflow/status/Sidy-group/gql-ws-server/CI?logo=Github&style=for-the-badge" />
</p>

<h3 align=center>A pod discovery sidecar for Kubernetes</h3>
<img align=center src="https://i.imgur.com/voB4N20.png" />

## Installation

```sh

```

## Integration
65 changes: 65 additions & 0 deletions k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apiVersion: v1
kind: Service
metadata:
name: disco-pod
spec:
selector:
app: disco-pod
type: NodePort
ports:
- port: 3000
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: disco-pod
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["endpoints"]
verbs: ["get", "watch", "list"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: disco-pod
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: disco-pod
namespace: default
roleRef:
kind: Role
name: disco-pod
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: disco-pod
namespace: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: disco-pod
spec:
replicas: 1
selector:
matchLabels:
app: disco-pod
template:
metadata:
labels:
app: disco-pod
spec:
serviceAccountName: disco-pod
containers:
- name: my-service
- name: disco-pod
image: disco-pod
imagePullPolicy: Never
tty: true
env:
- name: DEBUG
value: disco-pod*
54 changes: 54 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "@Sidy/disco-pod",
"version": "1.0.0",
"description": "A pod discovery sidecar for kubernetes",
"main": "src/index.js",
"type": "module",
"scripts": {
"start": "node --harmony --experimental-specifier-resolution=node src/index.js",
"lint": "eslint --color .",
"postversion": "git push && git push --tags"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Sidy-group/disco-pod.git"
},
"author": "Hydre",
"license": "MIT",
"bugs": {
"url": "https://github.com/Sidy-group/disco-pod/issues"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"homepage": "https://github.com/Sidy-group/disco-pod#readme",
"dependencies": {
"debug": "^4.1.1",
"kubernetes-client": "^8.3.7",
"zeromq": "6.0.0-beta.6"
},
"devDependencies": {
"@hydre/doubt": "^2.0.10",
"babel-eslint": "^10.1.0",
"eslint": "^6.8.0",
"eslint-config-adjunct": "^4.0.2",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-array-func": "^3.1.5",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-html": "^6.0.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-json-format": "^2.0.1",
"eslint-plugin-markdown": "^1.0.2",
"eslint-plugin-no-constructor-bind": "^1.2.8",
"eslint-plugin-no-secrets": "^0.6.5",
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-only-error": "^1.0.2",
"eslint-plugin-optimize-regex": "^1.1.7",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-simple-import-sort": "^5.0.2",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-switch-case": "^1.1.2",
"eslint-plugin-unicorn": "^18.0.1",
"tap-spec-emoji": "^6.0.7"
}
}
Loading

0 comments on commit 460f718

Please sign in to comment.