test
This commit is contained in:
parent
d49e5507f1
commit
f2d06c7161
@ -50,6 +50,7 @@ docker_deploy:
|
||||
entrypoint: [""]
|
||||
script:
|
||||
# - kubectl run console-${POD_VERSION} --image=reg.sre.victor-core.top/cobalt-strike/console:${PACKAGE_VERSION} --kubeconfig=.kube/config --certificate-authority=.kube/ca.pem
|
||||
- kubectl apply -f traefik-config.yaml
|
||||
- kubectl apply -f deploy.yaml
|
||||
tags:
|
||||
- cluster
|
64
deploy.yaml
64
deploy.yaml
@ -1,12 +1,60 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: Pod
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: console
|
||||
labels:
|
||||
namespace: sangge
|
||||
labels:
|
||||
app: console
|
||||
sepc:
|
||||
spec:
|
||||
volumes:
|
||||
- name: kube-api-access-zj4cn
|
||||
projected:
|
||||
sources:
|
||||
- serviceAccountToken:
|
||||
expirationSeconds: 3607
|
||||
path: token
|
||||
- configMap:
|
||||
name: kube-root-ca.crt
|
||||
items:
|
||||
- key: ca.crt
|
||||
path: ca.crt
|
||||
- downwardAPI:
|
||||
items:
|
||||
- path: namespace
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
defaultMode: 420
|
||||
containers:
|
||||
- name: console
|
||||
image: reg.sre.victor-core.top/cobalt-strike/console:1.3.0
|
||||
ports:
|
||||
- containerPort: 4444
|
||||
- name: container-ezl95t
|
||||
image: 'reg.sre.victor-core.top/cobalt-strike/console:1.3.0'
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
volumeMounts:
|
||||
- name: kube-api-access-zj4cn
|
||||
readOnly: true
|
||||
mountPath: /var/run/secrets/kubernetes.io/serviceaccount
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
imagePullPolicy: IfNotPresent
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
dnsPolicy: ClusterFirst
|
||||
serviceAccountName: default
|
||||
serviceAccount: default
|
||||
nodeName: 172.22.161.246
|
||||
securityContext: {}
|
||||
schedulerName: default-scheduler
|
||||
tolerations:
|
||||
- key: node.kubernetes.io/not-ready
|
||||
operator: Exists
|
||||
effect: NoExecute
|
||||
tolerationSeconds: 300
|
||||
- key: node.kubernetes.io/unreachable
|
||||
operator: Exists
|
||||
effect: NoExecute
|
||||
tolerationSeconds: 300
|
||||
priority: 0
|
||||
enableServiceLinks: true
|
||||
preemptionPolicy: PreemptLowerPriority
|
||||
|
@ -1,4 +1,5 @@
|
||||
from golang:latest
|
||||
copy . /go
|
||||
run go build -o console console.go
|
||||
expose 4444
|
||||
entrypoint ./console
|
21
traefik-config.yaml
Normal file
21
traefik-config.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: console
|
||||
namespace: sangge
|
||||
labels:
|
||||
app: console
|
||||
annotations:
|
||||
kubenetes.io/ingress.class: traefik
|
||||
spec:
|
||||
rules:
|
||||
- host: sangge.sre.victor-core.top
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: console
|
||||
port:
|
||||
number: 4444
|
Loading…
x
Reference in New Issue
Block a user