blob: 67dfee50c95ed0da72ba087ce04df183995a9b22 [file] [log] [blame]
# sw-backend-agent.yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: sw-admin-framework
name: sw-backend-thirdparty-agent-env
data:
SERVER_PORT: "8080"
SSL_ENABLED: "false"
#SSL_KEYSTORE_FILE: file:/certs/server/server.keystore
#SSL_TRUSTSTORE_FILE: file:/certs/server/server.truststore
POA_SERVER_URL: https://poa.supwisdom.com
POA_SCOPES: user:v1:readUser,user:v1:readOrganization,user:v1:readGroup,user:v1:readLabel,authz:v1:readRole
USER_AUTHORIZATION_SERVICE_APPLICATION_ID: "2"
---
apiVersion: v1
kind: Secret
metadata:
namespace: sw-admin-framework
name: sw-backend-thirdparty-agent-env-secret
type: Opaque
data:
#SSL_KEYSTORE_PASSWORD: ""
#SSL_TRUSTSTORE_PASSWORD: ""
POA_CLIENT_ID: blY4VVM5dUFkRlEwb3Z1WXBGT2xvWHRGa01FPQ==
POA_CLIENT_SECRET: ZERnWkF6dU5uT2pmc2JtOGlEb2h5VkNYQlUxR3dJbWVNc21rSnpqeUdoOD0=
---
apiVersion: v1
kind: Service
metadata:
namespace: sw-admin-framework
name: sw-backend-thirdparty-agent-svc
labels:
app: sw-backend-thirdparty-agent-svc
needMonitor: 'true'
spec:
ports:
- port: 8080
targetPort: http
protocol: TCP
name: http
- port: 6060
targetPort: http-metrics
protocol: TCP
name: http-metrics
selector:
app: sw-backend-thirdparty-agent
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: sw-admin-framework
name: sw-backend-thirdparty-agent
spec:
selector:
matchLabels:
app: sw-backend-thirdparty-agent
replicas: 1
template:
metadata:
labels:
app: sw-backend-thirdparty-agent
spec:
containers:
- name: sw-backend-thirdparty-agent
image: harbor.supwisdom.com/sw-admin-framework/sw-backend-thirdparty-agent:0.0.2-SNAPSHOT
imagePullPolicy: Always
ports:
- containerPort: 8080
name: http
- containerPort: 6060
name: http-metrics
envFrom:
- configMapRef:
name: jvm-env
- secretRef:
name: redis-env-secret
- secretRef:
name: sw-backend-thirdparty-agent-env-secret
- configMapRef:
name: sw-backend-thirdparty-agent-env
resources:
requests:
memory: "400Mi"
limits:
memory: "400Mi"
readinessProbe:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 20
periodSeconds: 5
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 10
imagePullSecrets:
- name: harbor-supwisdom