# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # --- apiVersion: v1 kind: Namespace metadata: name: helloworld --- apiVersion: v1 kind: Service metadata: name: dubbo-go-server namespace: helloworld labels: app: dubbo-go-server spec: type: ClusterIP ports: - name: triple protocol: TCP port: 20000 targetPort: 20000 selector: app: dubbo-go-server --- apiVersion: apps/v1 kind: Deployment metadata: name: dubbo-go-server namespace: helloworld labels: app: dubbo-go-server spec: replicas: 1 selector: matchLabels: app: dubbo-go-server template: metadata: labels: app: dubbo-go-server spec: containers: - name: server image: dubboregistry/helloworld-go-server:master imagePullPolicy: IfNotPresent ports: - name: triple containerPort: 20000 protocol: TCP env: - name: DUBBO_GO_CONFIG_PATH value: "/app/conf/dubbogo.yml" resources: limits: cpu: 500m memory: 512Mi requests: cpu: 100m memory: 128Mi livenessProbe: tcpSocket: port: 20000 initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: tcpSocket: port: 20000 initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 3 failureThreshold: 3