forked from koderover/zadig
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add piggymetrics example (koderover#1500)
* add piggymetrics example Signed-off-by: ddh27 <[email protected]> * add piggymetrics example Signed-off-by: ddh27 <[email protected]> * add piggymetrics example: set resource Signed-off-by: ddh27 <[email protected]> * add piggymetrics example: rm status Signed-off-by: ddh27 <[email protected]>
- Loading branch information
Showing
14 changed files
with
1,205 additions
and
0 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
examples/spring-cloud-piggymetrics/1-rabbitmq-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: infrastructure | ||
app: rabbitmq | ||
name: rabbitmq | ||
spec: | ||
ports: | ||
- name: http | ||
port: 15672 | ||
targetPort: 15672 | ||
- name: amqp | ||
port: 5672 | ||
targetPort: 5672 | ||
selector: | ||
project: piggymetrics | ||
tier: infrastructure | ||
app: rabbitmq | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: infrastructure | ||
app: rabbitmq | ||
name: rabbitmq | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
project: piggymetrics | ||
tier: infrastructure | ||
app: rabbitmq | ||
strategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: infrastructure | ||
app: rabbitmq | ||
spec: | ||
containers: | ||
- image: rabbitmq:3-management | ||
name: rabbitmq | ||
ports: | ||
- containerPort: 15672 | ||
- containerPort: 5672 | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 1G | ||
requests: | ||
cpu: 100m | ||
memory: 256M | ||
restartPolicy: Always |
97 changes: 97 additions & 0 deletions
97
examples/spring-cloud-piggymetrics/10-statistics-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: backend | ||
app: statistics-service | ||
name: statistics-service | ||
spec: | ||
ports: | ||
- name: http | ||
port: 7000 | ||
targetPort: 7000 | ||
selector: | ||
project: piggymetrics | ||
tier: backend | ||
app: statistics-service | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: backend | ||
app: statistics-service | ||
name: statistics-service | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
project: piggymetrics | ||
tier: backend | ||
app: statistics-service | ||
strategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: backend | ||
app: statistics-service | ||
spec: | ||
initContainers: | ||
- name: init-skywalking-agent | ||
image: ccr.ccs.tencentyun.com/koderover-public/skywalking-agent:8.8.0 | ||
command: | ||
- 'sh' | ||
- '-c' | ||
- 'set -ex;mkdir -p /vmskywalking/agent;cp -r /usr/skywalking/agent/* /vmskywalking/agent;' | ||
volumeMounts: | ||
- mountPath: /vmskywalking/agent | ||
name: skywalking-agent | ||
containers: | ||
- env: | ||
- name: JAVA_OPTS | ||
value: "-javaagent:/opt/skywalking/agent/skywalking-agent.jar -Duser.timezone=GMT+8" | ||
- name: SW_AGENT_NAME | ||
value: "statistics-service" | ||
- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES | ||
value: "skywalking-oap.skywalking.svc.cluster.local:11800" | ||
- name: CONFIG_SERVICE_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: config_service_password | ||
- name: MONGODB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: statistics_mongodb_password | ||
- name: STATISTICS_SERVICE_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: statistics_service_password | ||
envFrom: | ||
- configMapRef: | ||
name: special-config-env | ||
ports: | ||
- containerPort: 7000 | ||
image: ccr.ccs.tencentyun.com/koderover-public/piggymetrics-statistics-service:v0.3.0 | ||
name: statistics-service | ||
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
requests: | ||
cpu: 500m | ||
memory: 512M | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- mountPath: /opt/skywalking/agent | ||
name: skywalking-agent | ||
restartPolicy: Always | ||
volumes: | ||
- name: skywalking-agent | ||
emptyDir: {} |
61 changes: 61 additions & 0 deletions
61
examples/spring-cloud-piggymetrics/11-notification-mongodb-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: notification-mongodb | ||
labels: | ||
project: piggymetrics | ||
tier: database | ||
app: notification-mongodb | ||
spec: | ||
ports: | ||
- name: mongo | ||
port: 27017 | ||
targetPort: 27017 | ||
selector: | ||
project: piggymetrics | ||
tier: database | ||
app: notification-mongodb | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: database | ||
app: notification-mongodb | ||
name: notification-mongodb | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
project: piggymetrics | ||
tier: database | ||
app: notification-mongodb | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: database | ||
app: notification-mongodb | ||
spec: | ||
containers: | ||
- env: | ||
- name: MONGODB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: notification_mongodb_password | ||
ports: | ||
- containerPort: 27017 | ||
image: ccr.ccs.tencentyun.com/koderover-public/piggymetrics-mongodb:v0.1.1 | ||
name: notification-mongodb | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 1G | ||
requests: | ||
cpu: 100m | ||
memory: 256M | ||
restartPolicy: Always |
117 changes: 117 additions & 0 deletions
117
examples/spring-cloud-piggymetrics/12-notification-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: backend | ||
app: notification-service | ||
name: notification-service | ||
spec: | ||
ports: | ||
- name: http | ||
port: 8000 | ||
targetPort: 8000 | ||
selector: | ||
project: piggymetrics | ||
tier: backend | ||
app: notification-service | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: backend | ||
app: notification-service | ||
name: notification-service | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
project: piggymetrics | ||
tier: backend | ||
app: notification-service | ||
strategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
project: piggymetrics | ||
tier: backend | ||
app: notification-service | ||
spec: | ||
initContainers: | ||
- name: init-skywalking-agent | ||
image: ccr.ccs.tencentyun.com/koderover-public/skywalking-agent:8.8.0 | ||
command: | ||
- 'sh' | ||
- '-c' | ||
- 'set -ex;mkdir -p /vmskywalking/agent;cp -r /usr/skywalking/agent/* /vmskywalking/agent;' | ||
volumeMounts: | ||
- mountPath: /vmskywalking/agent | ||
name: skywalking-agent | ||
containers: | ||
- env: | ||
- name: JAVA_OPTS | ||
value: "-javaagent:/opt/skywalking/agent/skywalking-agent.jar -Duser.timezone=GMT+8" | ||
- name: SW_AGENT_NAME | ||
value: "notification-service" | ||
- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES | ||
value: "skywalking-oap.skywalking.svc.cluster.local:11800" | ||
- name: CONFIG_SERVICE_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: config_service_password | ||
- name: MONGODB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: notification_mongodb_password | ||
- name: NOTIFICATION_SERVICE_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: notification_service_password | ||
- name: NOTIFICATION_EMAIL_HOST | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: notification_email_host | ||
- name: NOTIFICATION_EMAIL_PORT | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: notification_email_port | ||
- name: NOTIFICATION_EMAIL_USER | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: notification_email_user | ||
- name: NOTIFICATION_EMAIL_PASS | ||
valueFrom: | ||
secretKeyRef: | ||
name: piggymetrics | ||
key: notification_email_pass | ||
envFrom: | ||
- configMapRef: | ||
name: special-config-env | ||
ports: | ||
- containerPort: 8000 | ||
image: ccr.ccs.tencentyun.com/koderover-public/piggymetrics-notification-service:v0.3.0 | ||
name: notification-service | ||
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
requests: | ||
cpu: 500m | ||
memory: 512M | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- mountPath: /opt/skywalking/agent | ||
name: skywalking-agent | ||
restartPolicy: Always | ||
volumes: | ||
- name: skywalking-agent | ||
emptyDir: {} |
Oops, something went wrong.