sxcooler commented on issue #1162:
URL: 
https://github.com/apache/servicecomb-service-center/issues/1162#issuecomment-949397097


   > pls show me the deployment.yaml file in chart. there has more info to help 
reproduce this problem
   
   ```
   ## 
---------------------------------------------------------------------------
   ## 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.
   ## 
---------------------------------------------------------------------------
   
   {{- $serviceName := include "service-center.fullname" . -}}
   {{- $servicePort := .Values.sc.service.externalPort -}}
   {{- if .Values.sc.deployment -}}
   ---
   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: {{ template "service-center.fullname" . }}
     namespace: {{ .Release.Namespace }}
     labels:
       app: {{ template "service-center.name" . }}
       chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
       release: {{ .Release.Name }}
       heritage: {{ .Release.Service }}
   spec:
     replicas: {{ .Values.sc.replicaCount }}
     selector:
       matchLabels:
         app: {{ template "service-center.name" . }}
     template:
       metadata:
         labels:
           app: {{ template "service-center.name" . }}
           release: {{ .Release.Name }}
       spec:
         serviceAccountName: {{ template "service-center.fullname" . }}
         volumes:
           - name: config
             configMap:
               name: {{ template "service-center.fullname" . }}
               items:
               - key: app-config
                 path: app.conf
         containers:
           - name: {{ .Chart.Name }}
             image: "{{ .Values.sc.image.repository }}:{{ .Values.sc.image.tag 
}}"
             imagePullPolicy: {{ .Values.sc.image.pullPolicy }}
             ports:
               - containerPort: {{ .Values.sc.service.internalPort }}
             volumeMounts:
             - name: config
               mountPath: /opt/service-center/conf
               readOnly: false
             resources:
   {{ toYaml .Values.sc.resources | indent 12 }}
       {{- if .Values.sc.nodeSelector }}
         nodeSelector:
   {{ toYaml .Values.sc.nodeSelector | indent 8 }}
       {{- end }}
   {{- end }}
   
   ```
   it's similar to ur example, just fix api-version, add selector to fit newer 
k8s.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to