-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7725 from stubenhuang/issue-ipv6-7544
feat: 蓝盾网关支持IPV6 #7544
- Loading branch information
Showing
13 changed files
with
198 additions
and
185 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,120 +1,120 @@ | ||
#stream Deployment | ||
{{ if .Values.stream.enabled -}} | ||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "bkci.names.fullname" . }}-stream | ||
labels: {{- include "bkci.labels.standard" . | nindent 4 }} | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- end }} | ||
app.kubernetes.io/component: microservice | ||
app.kubernetes.io/name: stream | ||
spec: | ||
selector: | ||
matchLabels: {{- include "bkci.labels.matchLabels" . | nindent 6 }} | ||
app.kubernetes.io/component: microservice | ||
app.kubernetes.io/name: stream | ||
{{- if not .Values.stream.autoscaling.enabled }} | ||
replicas: {{ .Values.stream.replicas }} | ||
{{- end }} | ||
template: | ||
metadata: | ||
labels: {{- include "bkci.labels.standard" . | nindent 8 }} | ||
{{- if .Values.stream.podLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.stream.podLabels "context" $) | nindent 8 }} | ||
{{- end }} | ||
app.kubernetes.io/component: microservice | ||
app.kubernetes.io/name: stream | ||
spec: | ||
serviceAccountName: {{ .Values.rbac.serviceAccount }} | ||
{{- if .Values.stream.hostAliases }} | ||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.stream.hostAliases "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.stream.affinity }} | ||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.stream.affinity "context" $) | nindent 8 }} | ||
{{- else }} | ||
affinity: | ||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.stream.podAffinityPreset "context" $) | nindent 10 }} | ||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.stream.podAntiAffinityPreset "context" $) | nindent 10 }} | ||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.stream.nodeAffinityPreset.type "key" .Values.stream.nodeAffinityPreset.key "values" .Values.stream.nodeAffinityPreset.values) | nindent 10 }} | ||
{{- end }} | ||
{{- if .Values.stream.nodeSelector }} | ||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.stream.nodeSelector "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.stream.tolerations }} | ||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.stream.tolerations "context" .) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.stream.priorityClassName }} | ||
priorityClassName: {{ .Values.stream.priorityClassName | quote }} | ||
{{- end }} | ||
{{- if .Values.stream.podSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.stream.podSecurityContext "enabled" | toYaml | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: stream | ||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.backendImage "global" $) }} | ||
imagePullPolicy: {{ .Values.backendImage.pullPolicy }} | ||
{{- if .Values.stream.containerSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.stream.containerSecurityContext "enabled" | toYaml | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.stream.resources }} | ||
resources: {{- toYaml .Values.stream.resources | nindent 12 }} | ||
{{- end }} | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
env: | ||
- name: MS_NAME | ||
value: stream | ||
- name: NAMESPACE | ||
value: {{ .Release.Namespace }} | ||
- name: RELEASE_NAME | ||
value: {{ .Release.Name }} | ||
- name: CHART_NAME | ||
value: {{ .Chart.Name }} | ||
- name: MULTI_CLUSTER | ||
value: {{ .Values.multiCluster.enabled | quote }} | ||
- name: DEFAULT_NAMESPACE | ||
value: {{ .Values.multiCluster.defaultNamespace }} | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.name | ||
workingDir: /data/workspace/stream | ||
{{ if .Values.entrypoint.override }} | ||
command: | ||
- "/bin/bash" | ||
- "-c" | ||
- | | ||
cp /data/workspace/backend.bkci.sh .; | ||
/bin/bash backend.bkci.sh; | ||
{{ end }} | ||
livenessProbe: | ||
httpGet: | ||
path: /management/health/livenessState | ||
port: http | ||
initialDelaySeconds: 90 | ||
periodSeconds: 15 | ||
timeoutSeconds: 10 | ||
failureThreshold: 5 | ||
successThreshold: 1 | ||
readinessProbe: | ||
httpGet: | ||
path: /management/health/readinessState | ||
port: http | ||
initialDelaySeconds: 60 | ||
periodSeconds: 15 | ||
timeoutSeconds: 10 | ||
failureThreshold: 5 | ||
successThreshold: 1 | ||
volumeMounts: | ||
- mountPath: /data/workspace/stream/jvm | ||
name: log-volume | ||
subPathExpr: bkci/jvm/$(POD_NAME) | ||
volumes: | ||
- hostPath: | ||
path: /data | ||
name: log-volume | ||
{{- end -}} | ||
#stream Deployment | ||
{{ if .Values.stream.enabled -}} | ||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "bkci.names.fullname" . }}-stream | ||
labels: {{- include "bkci.labels.standard" . | nindent 4 }} | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- end }} | ||
app.kubernetes.io/component: microservice | ||
app.kubernetes.io/name: stream | ||
spec: | ||
selector: | ||
matchLabels: {{- include "bkci.labels.matchLabels" . | nindent 6 }} | ||
app.kubernetes.io/component: microservice | ||
app.kubernetes.io/name: stream | ||
{{- if not .Values.stream.autoscaling.enabled }} | ||
replicas: {{ .Values.stream.replicas }} | ||
{{- end }} | ||
template: | ||
metadata: | ||
labels: {{- include "bkci.labels.standard" . | nindent 8 }} | ||
{{- if .Values.stream.podLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.stream.podLabels "context" $) | nindent 8 }} | ||
{{- end }} | ||
app.kubernetes.io/component: microservice | ||
app.kubernetes.io/name: stream | ||
spec: | ||
serviceAccountName: {{ .Values.rbac.serviceAccount }} | ||
{{- if .Values.stream.hostAliases }} | ||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.stream.hostAliases "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.stream.affinity }} | ||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.stream.affinity "context" $) | nindent 8 }} | ||
{{- else }} | ||
affinity: | ||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.stream.podAffinityPreset "context" $) | nindent 10 }} | ||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.stream.podAntiAffinityPreset "context" $) | nindent 10 }} | ||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.stream.nodeAffinityPreset.type "key" .Values.stream.nodeAffinityPreset.key "values" .Values.stream.nodeAffinityPreset.values) | nindent 10 }} | ||
{{- end }} | ||
{{- if .Values.stream.nodeSelector }} | ||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.stream.nodeSelector "context" $) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.stream.tolerations }} | ||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.stream.tolerations "context" .) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.stream.priorityClassName }} | ||
priorityClassName: {{ .Values.stream.priorityClassName | quote }} | ||
{{- end }} | ||
{{- if .Values.stream.podSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.stream.podSecurityContext "enabled" | toYaml | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: stream | ||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.backendImage "global" $) }} | ||
imagePullPolicy: {{ .Values.backendImage.pullPolicy }} | ||
{{- if .Values.stream.containerSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.stream.containerSecurityContext "enabled" | toYaml | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.stream.resources }} | ||
resources: {{- toYaml .Values.stream.resources | nindent 12 }} | ||
{{- end }} | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
env: | ||
- name: MS_NAME | ||
value: stream | ||
- name: NAMESPACE | ||
value: {{ .Release.Namespace }} | ||
- name: RELEASE_NAME | ||
value: {{ .Release.Name }} | ||
- name: CHART_NAME | ||
value: {{ .Chart.Name }} | ||
- name: MULTI_CLUSTER | ||
value: {{ .Values.multiCluster.enabled | quote }} | ||
- name: DEFAULT_NAMESPACE | ||
value: {{ .Values.multiCluster.defaultNamespace }} | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.name | ||
workingDir: /data/workspace/stream | ||
{{ if .Values.entrypoint.override }} | ||
command: | ||
- "/bin/bash" | ||
- "-c" | ||
- | | ||
cp /data/workspace/backend.bkci.sh .; | ||
/bin/bash backend.bkci.sh; | ||
{{ end }} | ||
livenessProbe: | ||
httpGet: | ||
path: /management/health/livenessState | ||
port: http | ||
initialDelaySeconds: 90 | ||
periodSeconds: 15 | ||
timeoutSeconds: 10 | ||
failureThreshold: 5 | ||
successThreshold: 1 | ||
readinessProbe: | ||
httpGet: | ||
path: /management/health/readinessState | ||
port: http | ||
initialDelaySeconds: 60 | ||
periodSeconds: 15 | ||
timeoutSeconds: 10 | ||
failureThreshold: 5 | ||
successThreshold: 1 | ||
volumeMounts: | ||
- mountPath: /data/workspace/stream/jvm | ||
name: log-volume | ||
subPathExpr: bkci/jvm/$(POD_NAME) | ||
volumes: | ||
- hostPath: | ||
path: /data | ||
name: log-volume | ||
{{- end -}} |
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 |
---|---|---|
@@ -1,38 +1,38 @@ | ||
# stream hpa | ||
{{ if .Values.stream.enabled -}} | ||
{{ if .Values.stream.autoscaling.enabled }} | ||
apiVersion: autoscaling/v2beta1 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ include "bkci.names.fullname" . }}-stream | ||
labels: {{- include "bkci.labels.standard" . | nindent 4 }} | ||
app.kubernetes.io/name: stream | ||
app.kubernetes.io/component: microservice | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} | ||
kind: Deployment | ||
name: {{ include "bkci.names.fullname" . }}-stream | ||
minReplicas: {{ .Values.stream.autoscaling.minReplicas }} | ||
maxReplicas: {{ .Values.stream.autoscaling.maxReplicas }} | ||
metrics: | ||
{{- if .Values.stream.autoscaling.targetCPU }} | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
targetAverageUtilization: {{ .Values.stream.autoscaling.targetCPU }} | ||
{{- end }} | ||
{{- if .Values.stream.autoscaling.targetMemory }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
targetAverageUtilization: {{ .Values.stream.autoscaling.targetMemory }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} | ||
# stream hpa | ||
{{ if .Values.stream.enabled -}} | ||
{{ if .Values.stream.autoscaling.enabled }} | ||
apiVersion: autoscaling/v2beta1 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ include "bkci.names.fullname" . }}-stream | ||
labels: {{- include "bkci.labels.standard" . | nindent 4 }} | ||
app.kubernetes.io/name: stream | ||
app.kubernetes.io/component: microservice | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} | ||
kind: Deployment | ||
name: {{ include "bkci.names.fullname" . }}-stream | ||
minReplicas: {{ .Values.stream.autoscaling.minReplicas }} | ||
maxReplicas: {{ .Values.stream.autoscaling.maxReplicas }} | ||
metrics: | ||
{{- if .Values.stream.autoscaling.targetCPU }} | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
targetAverageUtilization: {{ .Values.stream.autoscaling.targetCPU }} | ||
{{- end }} | ||
{{- if .Values.stream.autoscaling.targetMemory }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
targetAverageUtilization: {{ .Values.stream.autoscaling.targetMemory }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} |
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
{{ if .Values.stream.enabled -}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "bkci.names.fullname" . }}-stream | ||
labels: {{- include "bkci.labels.standard" . | nindent 4 }} | ||
app.kubernetes.io/name: stream | ||
app.kubernetes.io/component: microservice | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: ClusterIP | ||
selector: {{- include "bkci.labels.matchLabels" . | nindent 4 }} | ||
app.kubernetes.io/component: microservice | ||
app.kubernetes.io/name: stream | ||
ports: | ||
- name: http | ||
port: 80 | ||
targetPort: 80 | ||
protocol: TCP | ||
{{- end -}} | ||
{{ if .Values.stream.enabled -}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "bkci.names.fullname" . }}-stream | ||
labels: {{- include "bkci.labels.standard" . | nindent 4 }} | ||
app.kubernetes.io/name: stream | ||
app.kubernetes.io/component: microservice | ||
{{- if .Values.commonLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: ClusterIP | ||
selector: {{- include "bkci.labels.matchLabels" . | nindent 4 }} | ||
app.kubernetes.io/component: microservice | ||
app.kubernetes.io/name: stream | ||
ports: | ||
- name: http | ||
port: 80 | ||
targetPort: 80 | ||
protocol: TCP | ||
{{- end -}} |
Oops, something went wrong.