Skip to content

Commit

Permalink
fix:sync instance version not set
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun committed Jan 4, 2024
1 parent f7cbffe commit f525400
Show file tree
Hide file tree
Showing 40 changed files with 241 additions and 42,542 deletions.
3 changes: 2 additions & 1 deletion cmd/polaris-controller/app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ import (
type ProxyMetadata struct {
ServerAddress string `yaml:"serverAddress"`
ClusterName string `yaml:"clusterName"`
OpenDemand string `yaml:"openDemand"`
CAAddress string `yaml:"caAddress"`
}

// DefaultConfig controller 用到的配置
type DefaultConfig struct {
ProxyMetadata ProxyMetadata `yaml:"serviceSync"`
ProxyMetadata ProxyMetadata `yaml:"proxyMetadata"`
}

// SidecarInject sidecar 注入相关
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes_v1.21/helm/templates/_params.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ Define the cmd envs for the bootstrap init container.
value: 15010
- name: CLUSTER_NAME
value: {{ "{{" }}.ProxyConfig.ProxyMetadata.clusterName{{ "}}" }}
- name: OPEN_DEMAND
value: {{ "{{" }}.ProxyConfig.ProxyMetadata.opemDemand{{ "}}" }}
{{- end -}}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@ data:
defaultGroup: {{ .Values.polaris.sync.config.groupName }}
defaultConfig:
proxyMetadata:
serverAddress: {{ .Values.polaris.server.address }}
serverAddress: {{ .Values.polaris.server.address }}
clusterName: "{{ .Values.cluster.name }}"
3 changes: 2 additions & 1 deletion deploy/kubernetes_v1.21/kubernetes/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ data:
defaultGroup: "#CLUSTER_NAME#"
defaultConfig:
proxyMetadata:
serverAddress: #POLARIS_HOST#
serverAddress: #POLARIS_HOST#
clusterName: #CLUSTER_NAME#
2 changes: 2 additions & 0 deletions deploy/kubernetes_v1.21/kubernetes/injector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ data:
value: 15010
- name: CLUSTER_NAME
value: {{.ProxyConfig.ProxyMetadata.clusterName}}
- name: OPEN_DEMAND
value: {{.ProxyConfig.ProxyMetadata.opemDemand}}
volumeMounts:
- mountPath: /var/lib/data
name: envoy-bootstrap
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes_v1.22/helm/templates/_params.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Define the cmd envs for the bootstrap init container.
value: 15010
- name: CLUSTER_NAME
value: {{ "{{" }}.ProxyConfig.ProxyMetadata.clusterName{{ "}}" }}
- name: OPEN_DEMAND
value: {{ "{{" }}.ProxyConfig.ProxyMetadata.opemDemand{{ "}}" }}
{{- end -}}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@ data:
defaultGroup: {{ .Values.polaris.sync.config.groupName }}
defaultConfig:
proxyMetadata:
serverAddress: {{ .Values.polaris.server.address }}
serverAddress: {{ .Values.polaris.server.address }}
clusterName: "{{ .Values.cluster.name }}"
3 changes: 2 additions & 1 deletion deploy/kubernetes_v1.22/kubernetes/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ data:
defaultGroup: "#CLUSTER_NAME#"
defaultConfig:
proxyMetadata:
serverAddress: #POLARIS_HOST#
serverAddress: #POLARIS_HOST#
clusterName: #CLUSTER_NAME#
2 changes: 2 additions & 0 deletions deploy/kubernetes_v1.22/kubernetes/injector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ data:
value: 15010
- name: CLUSTER_NAME
value: {{.ProxyConfig.ProxyMetadata.clusterName}}
- name: OPEN_DEMAND
value: {{.ProxyConfig.ProxyMetadata.opemDemand}}
volumeMounts:
- mountPath: /var/lib/data
name: envoy-bootstrap
Expand Down
201 changes: 0 additions & 201 deletions pkg/inject/api/annotation/annotations.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,178 +49,6 @@ type Instance struct {
}

var (

AlphaCanonicalServiceAccounts = Instance {
Name: "alpha.polarismesh.cn/canonical-serviceaccounts",
Description: "Specifies the non-Kubernetes service accounts that are "+
"allowed to run this service. NOTE This API is Alpha and "+
"has no stability guarantees.",
Hidden: true,
Deprecated: false,
Resources: []ResourceTypes{ Service, },
}

AlphaIdentity = Instance {
Name: "alpha.polarismesh.cn/identity",
Description: "Identity for the workload. NOTE This API is Alpha and has "+
"no stability guarantees.",
Hidden: true,
Deprecated: false,
Resources: []ResourceTypes{ Pod, },
}

AlphaKubernetesServiceAccounts = Instance {
Name: "alpha.polarismesh.cn/kubernetes-serviceaccounts",
Description: "Specifies the Kubernetes service accounts that are "+
"allowed to run this service on the VMs. NOTE This API is "+
"Alpha and has no stability guarantees.",
Hidden: true,
Deprecated: false,
Resources: []ResourceTypes{ Service, },
}

GalleyAnalyzeSuppress = Instance {
Name: "galley.polarismesh.cn/analyze-suppress",
Description: "A comma separated list of configuration analysis message "+
"codes to suppress when Istio analyzers are run. For "+
"example, to suppress reporting of IST0103 "+
"(PodMissingProxy) and IST0108 (UnknownAnnotation) on a "+
"resource, apply the annotation "+
"'galley.polarismesh.cn/analyze-suppress=IST0108,IST0103'. If "+
"the value is '*', then all configuration analysis "+
"messages are suppressed.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Any, },
}

OperatorInstallChartOwner = Instance {
Name: "install.operator.polarismesh.cn/chart-owner",
Description: "Represents the name of the chart used to create this "+
"resource.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Any, },
}

OperatorInstallOwnerGeneration = Instance {
Name: "install.operator.polarismesh.cn/owner-generation",
Description: "Represents the generation to which the resource was last "+
"reconciled.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Any, },
}

OperatorInstallVersion = Instance {
Name: "install.operator.polarismesh.cn/version",
Description: "Represents the Istio version associated with the resource",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Any, },
}

IoKubernetesIngressClass = Instance {
Name: "kubernetes.io/ingress.class",
Description: "Annotation on an Ingress resources denoting the class of "+
"controllers responsible for it.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Ingress, },
}

AlphaNetworkingEndpointsVersion = Instance {
Name: "networking.alpha.po la ri s me sh/endpointsVersion",
Description: "Added to synthetic ServiceEntry resources to provide the "+
"raw resource version from the most recent Kubernetes "+
"endpoints update (if available). NOTE This API is Alpha "+
"and has no stability guarantees.",
Hidden: true,
Deprecated: false,
Resources: []ResourceTypes{ ServiceEntry, },
}

AlphaNetworkingNotReadyEndpoints = Instance {
Name: "networking.alpha.polarismesh.cn/notReadyEndpoints",
Description: "Added to synthetic ServiceEntry resources to provide the "+
"'NotReadyAddresses' from the Kubernetes Endpoints "+
"resource. The value is a comma-separated list of IP:port. "+
"NOTE This API is Alpha and has no stability guarantees.",
Hidden: true,
Deprecated: false,
Resources: []ResourceTypes{ ServiceEntry, },
}

AlphaNetworkingServiceVersion = Instance {
Name: "networking.alpha.polarismesh.cn/serviceVersion",
Description: "Added to synthetic ServiceEntry resources to provide the "+
"raw resource version from the most recent Kubernetes "+
"service update. This will always be available for "+
"synthetic service entries. NOTE This API is Alpha and has "+
"no stability guarantees.",
Hidden: true,
Deprecated: false,
Resources: []ResourceTypes{ ServiceEntry, },
}

NetworkingExportTo = Instance {
Name: "networking.polarismesh.cn/exportTo",
Description: "Specifies the namespaces to which this service should be "+
"exported to. A value of '*' indicates it is reachable "+
"within the mesh '.' indicates it is reachable within its "+
"namespace.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Service, },
}

PolicyCheck = Instance {
Name: "policy.polarismesh.cn/check",
Description: "Determines the policy for behavior when unable to connect "+
"to Mixer. If not set, FAIL_CLOSE is set, rejecting "+
"requests.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Pod, },
}

PolicyCheckBaseRetryWaitTime = Instance {
Name: "policy.polarismesh.cn/checkBaseRetryWaitTime",
Description: "Base time to wait between retries, will be adjusted by "+
"backoff and jitter. In duration format. If not set, this "+
"will be 80ms.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Pod, },
}

PolicyCheckMaxRetryWaitTime = Instance {
Name: "policy.polarismesh.cn/checkMaxRetryWaitTime",
Description: "Maximum time to wait between retries to Mixer. In "+
"duration format. If not set, this will be 1000ms.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Pod, },
}

PolicyCheckRetries = Instance {
Name: "policy.polarismesh.cn/checkRetries",
Description: "The maximum number of retries on transport errors to "+
"Mixer. If not set, this will be 0, indicating no retries.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Pod, },
}

PolicyLang = Instance {
Name: "policy.polarismesh.cn/lang",
Description: "Selects the attribute expression language runtime for "+
"Mixer.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Pod, },
}

SidecarStatusReadinessApplicationPorts = Instance {
Name: "readiness.status.sidecar.polarismesh.cn/applicationPorts",
Description: "Specifies the list of ports exposed by the application "+
Expand Down Expand Up @@ -278,25 +106,6 @@ var (
Resources: []ResourceTypes{ Pod, },
}

SidecarComponentLogLevel = Instance {
Name: "sidecar.polarismesh.cn/componentLogLevel",
Description: "Specifies the component log level for Envoy.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Pod, },
}

SidecarControlPlaneAuthPolicy = Instance {
Name: "sidecar.polarismesh.cn/controlPlaneAuthPolicy",
Description: "Specifies the auth policy used by the Istio control "+
"plane. If NONE, traffic will not be encrypted. If "+
"MUTUAL_TLS, traffic between Envoy sidecar will be wrapped "+
"into mutual TLS connections.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Pod, },
}

SidecarDiscoveryAddress = Instance {
Name: "sidecar.polarismesh.cn/discoveryAddress",
Description: "Specifies the XDS discovery address to be used by the "+
Expand Down Expand Up @@ -492,14 +301,4 @@ var (
Deprecated: false,
Resources: []ResourceTypes{ Pod, },
}

SidecarTrafficKubevirtInterfaces = Instance {
Name: "traffic.sidecar.polarismesh.cn/kubevirtInterfaces",
Description: "A comma separated list of virtual interfaces whose "+
"inbound traffic (from VM) will be treated as outbound.",
Hidden: false,
Deprecated: false,
Resources: []ResourceTypes{ Pod, },
}

)
Loading

0 comments on commit f525400

Please sign in to comment.