Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kube: initial commit #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apt-get clean && apt-get update \
RUN pip install pip==18.1

# Put all of our files in an application-specific directory.
WORKDIR app
WORKDIR /usr/src/app

# Only copy the requirements file before installing requirements so that
# updating our Python code doesn't force the requirements to be reinstalled.
Expand Down
24 changes: 24 additions & 0 deletions kube/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Using ORR on Kubernetes

**Run the webserver**

```
kubectl create -f orr.yaml
```

**Use the proxy to visit**

```
```

## Debugging

**Get ORR logs**

```
kubectl logs $(kubectl get pod -l app=orr -o=jsonpath='{.items[0].metadata.name}') orr
```

### TODO

- Add a git puller to download data from git vs using sample data
46 changes: 46 additions & 0 deletions kube/orr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: orr
labels:
app: orr
spec:
replicas: 1
selector:
matchLabels:
app: orr
template:
metadata:
name: orr
labels:
app: orr
spec:
volumes:
- name: shared-data
emptyDir: {}
containers:
- name: nginx
image: nginx
volumeMounts:
- name: shared-data
mountPath: /usr/share/nginx/html
- name: orr
image: quay.io/osvtac/osv-results-reporter
imagePullPolicy: Always
workingDir: /usr/src/app
volumeMounts:
- name: shared-data
mountPath: /web-data
args: ["--output-dir", "/web-data", "--input", "sampledata/test-minimal", "--template", "templates/test-minimal"]
---
kind: Service
apiVersion: v1
metadata:
name: orr
spec:
selector:
app: orr
ports:
- protocol: TCP
port: 80
targetPort: 80