This repository has been archived by the owner on Oct 9, 2024. It is now read-only.
generated from JupiterOne-Archives/integration-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from creativice/feature/basic-auth
Add basic k8s components
- Loading branch information
Showing
79 changed files
with
20,706 additions
and
1,962 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
.j1-integration/ | ||
dist/ | ||
.env | ||
.eslintcache |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:12-alpine | ||
|
||
WORKDIR . | ||
|
||
# node-gyp/python3 requirement | ||
RUN apk add g++ make python | ||
|
||
COPY package.json yarn.lock ./ | ||
|
||
RUN yarn install --production | ||
|
||
COPY . . | ||
|
||
CMD ["yarn", "collect"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
annotations: | ||
rbac.authorization.kubernetes.io/autoupdate: 'true' | ||
labels: | ||
name: test-read-only | ||
namespace: default | ||
rules: | ||
- apiGroups: | ||
- '' | ||
resources: ['*'] | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- extensions | ||
resources: ['*'] | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- apps | ||
resources: ['*'] | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- batch | ||
resources: ['*'] | ||
verbs: | ||
- get | ||
- list | ||
- watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: test-binding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: cluster-sa | ||
namespace: default | ||
roleRef: | ||
kind: ClusterRole | ||
name: test-read-only | ||
apiGroup: rbac.authorization.k8s.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: jupiterone-integration-secret | ||
type: Opaque | ||
data: | ||
# base64 encoded values | ||
# could use better key-names I'm just unsure of guidelines on that at the moment | ||
jaccountid: <base64encoded jupiterone account id> | ||
japikey: <base64encoded jupiterone api key> | ||
integrationid: <base64encoded integration id> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: batch/v1beta1 | ||
kind: CronJob | ||
metadata: | ||
name: integration-deployment-cron | ||
labels: | ||
app: integration-cron | ||
spec: | ||
schedule: "*/60 * * * *" # Schedule to run every 10 minutes | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: cluster-sa | ||
containers: | ||
- name: integration | ||
image: my-new-image | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
# could use better name, but for now: | ||
# ACCESS_TYPE can either be "namespace" or "cluster" | ||
- name: ACCESS_TYPE | ||
value: 'cluster' | ||
# If ACCESS_TYPE === "namespace" | ||
# This needs to contain its name | ||
- name: NAMESPACE | ||
value: 'default' | ||
- name: JUPITERONE_ACCOUNT_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: jaccountid | ||
- name: JUPITERONE_API_KEY | ||
valueFrom: | ||
secretKeyRef:jone-secret | ||
name: jupiterone-integration-secret | ||
key: japikey | ||
- name: INTEGRATION_INSTANCE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: integrationid | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: batch/v1beta1 | ||
kind: CronJob | ||
metadata: | ||
name: integration-deployment-cron | ||
labels: | ||
app: integration-cron | ||
spec: | ||
schedule: "*/60 * * * *" # Schedule to run every 10 minutes | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: namespace-sa | ||
containers: | ||
- name: integration | ||
image: my-new-image | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
# could use better name, but for now: | ||
# ACCESS_TYPE can either be "namespace" or "cluster" | ||
- name: ACCESS_TYPE | ||
value: 'namespace' | ||
# If ACCESS_TYPE === "namespace" | ||
# This needs to contain its name | ||
- name: NAMESPACE | ||
value: 'default' | ||
- name: JUPITERONE_ACCOUNT_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: jaccountid | ||
- name: JUPITERONE_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: japikey | ||
- name: INTEGRATION_INSTANCE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: integrationid | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: integration-deployment | ||
labels: | ||
app: integration | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: integration | ||
template: | ||
metadata: | ||
labels: | ||
app: integration | ||
spec: | ||
serviceAccountName: cluster-sa | ||
containers: | ||
- name: integration | ||
image: my-new-image | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
# could use better name, but for now: | ||
# ACCESS_TYPE can either be "namespace" or "cluster" | ||
- name: ACCESS_TYPE | ||
value: 'cluster' | ||
# If ACCESS_TYPE === "namespace" | ||
# This needs to contain its name | ||
- name: NAMESPACE | ||
value: 'default' | ||
- name: JUPITERONE_ACCOUNT_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: jaccountid | ||
- name: JUPITERONE_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: japikey | ||
- name: INTEGRATION_INSTANCE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: integrationid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: integration-deployment | ||
labels: | ||
app: integration | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: integration | ||
template: | ||
metadata: | ||
labels: | ||
app: integration | ||
spec: | ||
serviceAccountName: namespace-sa | ||
containers: | ||
- name: integration | ||
image: my-new-image | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
# could use better name, but for now: | ||
# ACCESS_TYPE can either be "namespace" or "cluster" | ||
- name: ACCESS_TYPE | ||
value: 'namespace' | ||
# If ACCESS_TYPE === "namespace" | ||
# This needs to contain its name | ||
- name: NAMESPACE | ||
value: 'default' | ||
- name: JUPITERONE_ACCOUNT_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: jaccountid | ||
- name: JUPITERONE_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: japikey | ||
- name: INTEGRATION_INSTANCE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: integrationid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: integration-job | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: cluster-sa | ||
containers: | ||
- name: integration | ||
image: my-new-image | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
# could use better name, but for now: | ||
# ACCESS_TYPE can either be "namespace" or "cluster" | ||
- name: ACCESS_TYPE | ||
value: 'cluster' | ||
# If ACCESS_TYPE === "namespace" | ||
# This needs to contain its name | ||
- name: NAMESPACE | ||
value: 'default' | ||
- name: IS_RUNNING_TEST | ||
value: 'false' | ||
- name: JUPITERONE_ACCOUNT_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: jaccountid | ||
- name: JUPITERONE_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: japikey | ||
- name: INTEGRATION_INSTANCE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: jupiterone-integration-secret | ||
key: integrationid | ||
restartPolicy: Never | ||
backoffLimit: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.