add skywalking dockerfile and prod redis
parent
00be9c6daa
commit
6e998c5eef
|
@ -0,0 +1,15 @@
|
|||
FROM alpine:3.19 as builder
|
||||
|
||||
ARG SKYWALKING_AGENT="apache-skywalking-java-agent-9.1.0.tgz"
|
||||
|
||||
RUN wget https://dlcdn.apache.org/skywalking/java-agent/9.1.0/$SKYWALKING_AGENT && \
|
||||
tar xf $SKYWALKING_AGENT
|
||||
|
||||
FROM openjdk:11-jre-slim
|
||||
|
||||
LABEL MAINTRAINER="beaconfire"
|
||||
|
||||
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="" \
|
||||
SW_AGENT_NAME=""
|
||||
|
||||
COPY --from=builder /skywalking-agent /agent
|
|
@ -0,0 +1,15 @@
|
|||
FROM alpine:3.19 as builder
|
||||
|
||||
ARG SKYWALKING_AGENT="apache-skywalking-java-agent-9.1.0.tgz"
|
||||
|
||||
RUN wget https://dlcdn.apache.org/skywalking/java-agent/9.1.0/$SKYWALKING_AGENT && \
|
||||
tar xf $SKYWALKING_AGENT
|
||||
|
||||
FROM openjdk:8-jre-slim
|
||||
|
||||
LABEL MAINTRAINER="beaconfire"
|
||||
|
||||
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="" \
|
||||
SW_AGENT_NAME=""
|
||||
|
||||
COPY --from=builder /skywalking-agent /agent
|
|
@ -1,20 +1,3 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: redis-config
|
||||
labels:
|
||||
app: redis
|
||||
data:
|
||||
redis.conf: |-
|
||||
dir /srv
|
||||
port 6379
|
||||
bind 0.0.0.0
|
||||
appendonly yes
|
||||
daemonize no
|
||||
requirepass beaconfire@123
|
||||
pidfile /srv/redis-6379.pid
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
@ -41,20 +24,23 @@ spec:
|
|||
privileged: true
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:6.2.12
|
||||
command:
|
||||
- "sh"
|
||||
- "-c"
|
||||
- "redis-server /usr/local/redis/redis.conf"
|
||||
image: redis/redis-stack-server:7.2.0-v0
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
- protocol: TCP
|
||||
containerPort: 6379
|
||||
env:
|
||||
- name: "REDIS_ARGS"
|
||||
value: "--requirepass beaconfire@123"
|
||||
volumeMounts:
|
||||
- name: redis
|
||||
mountPath: /data
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 1Gi
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
|
@ -71,14 +57,19 @@ spec:
|
|||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /usr/local/redis/redis.conf
|
||||
subPath: redis.conf
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: redis-config
|
||||
- name: redis
|
||||
hostPath:
|
||||
path: /data/prod/redis
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: "kubernetes.io/hostname"
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-2-8.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
|
@ -90,7 +81,7 @@ spec:
|
|||
- port: 6379
|
||||
protocol: TCP
|
||||
targetPort: 6379
|
||||
nodePort: 30011
|
||||
nodePort: 30006
|
||||
selector:
|
||||
app: redis
|
||||
type: NodePort
|
||||
type: ClusterIP
|
||||
|
|
Loading…
Reference in New Issue