Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Asiya-Yunusa authored Mar 9, 2023
1 parent ca07a1d commit bd55119
Show file tree
Hide file tree
Showing 14 changed files with 482 additions and 1 deletion.
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#FROM ubuntu:16.04
#FROM matthewfeickert/docker-python3-ubuntu:latest
FROM python:3.7-alpine3.8

#RUN sudo apt-get update -y && \
# sudo apt-get install -y python-dev
RUN python3 --version

# We copy just the requirements.txt first to leverage Docker cache
COPY ./requirements.txt /app/requirements.txt

WORKDIR /app

RUN env
RUN pip3 install --proxy="http://172.25.20.117:80" Flask

RUN pip3 install --proxy="http://172.25.20.117:80" --upgrade pip
#RUN pip3 install --proxy="http://172.25.20.117:80" pybase64
RUN pip3 install --proxy="http://172.25.20.117:80" -r requirements.txt


COPY ./app /app

WORKDIR /app

CMD ["gunicorn", "--bind", "0.0.0.0:5000", "wsgi:warden", "--certfile", "certs/tls.crt", "--keyfile", "certs/tls.key" ]
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# mutating-webhook
Appdynamics Warden

21 changes: 21 additions & 0 deletions apiserver-client-certificate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
kind: Certificate
apiVersion: cert-manager.io/v1
metadata:
name: client
namespace: mutation
spec:
issuerRef:
name: ca-root
kind: ClusterIssuer
secretName: client-cert
duration: 8760h
renewBefore: 24h
dnsNames:
- warden.mutation.svc
isCA: false
privateKey:
algorithm: RSA
size: 2048
usages:
- client auth
- server auth
6 changes: 6 additions & 0 deletions ca-root-bootstrap-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: ClusterIssuer
apiVersion: cert-manager.io/v1
metadata:
name: ca-bootstrap
spec:
selfSigned: {}
17 changes: 17 additions & 0 deletions ca-root-certificate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: ca-root
namespace: cert-manager
spec:
commonName: ca-root
isCA: true
issuerRef:
kind: ClusterIssuer
name: ca-bootstrap
privateKey:
algorithm: RSA
size: 2048
secretName: ca-root
duration: 8760h0m0s
renewBefore: 24h
7 changes: 7 additions & 0 deletions ca-root-cluster-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: ClusterIssuer
apiVersion: cert-manager.io/v1
metadata:
name: ca-root
spec:
ca:
secretName: ca-root
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
flask
jsonify
Werkzeug
jsonpatch
gunicorn
8 changes: 8 additions & 0 deletions warden-agent-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: warden-agent-config
namespace: mutation
data:
java_agent: repo.isw.la/appd-java-agent:20.11.0.31438
dotnet_agent: repo.isw.la/appdynamics-dotnet:20.8.0
31 changes: 31 additions & 0 deletions warden-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v1
items:
- apiVersion: v1
data:
APPDYNAMICS_AGENT_ACCOUNT_NAME: customer1
APPDYNAMICS_CONTROLLER_HOST_NAME: 172.26.42.50
APPDYNAMICS_CONTROLLER_PORT: "8090"
APPDYNAMICS_CONTROLLER_SSL_ENABLED: "false"
APPDYNAMICS_NETVIZ_AGENT_PORT: "3892"
kind: ConfigMap
metadata:
name: warden-config
- apiVersion: v1
data:
JAVA_OPTS: -Dappdynamics.controller.ssl.enabled=$(APPDYNAMICS_CONTROLLER_SSL_ENABLED)
-Dappdynamics.agent.accountName=$(APPDYNAMICS_AGENT_ACCOUNT_NAME) -Dappdynamics.agent.applicationName=$(APPDYNAMICS_AGENT_APPLICATION_NAME)
-Dappdynamics.agent.tierName=$(APPDYNAMICS_AGENT_TIER_NAME) -Dappdynamics.agent.reuse.nodeName=true
-Dappdynamics.agent.reuse.nodeName.prefix=$(APPDYNAMICS_AGENT_REUSE_NODE_NAME_PREFIX)
-javaagent:/opt/appdynamics/javaagent.jar
kind: ConfigMap
metadata:
name: warden-java-opts-config
- apiVersion: v1
data:
AppDynamicsConfig.json: "{\r\n \"feature\": [\r\n \"FULL_AGENT\"\r\n
\ ],\r\n \"log\": [\r\n {\r\n \"outputtype\": \"console\"\r\n
\ }\r\n ]\r\n}"
kind: ConfigMap
metadata:
name: appd-config
kind: List
39 changes: 39 additions & 0 deletions warden-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: mutation
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: mutation
name: warden-deployment
labels:
app: warden
spec:
replicas: 3
selector:
matchLabels:
app: warden
template:
metadata:
labels:
app: warden
spec:
containers:
- name: warden
image: repo.isw.la/appd-webhook:1.0
imagePullPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: warden
namespace: mutation
spec:
selector:
app: warden
ports:
- port: 443
targetPort: 5000
Loading

0 comments on commit bd55119

Please sign in to comment.