Skip to content

Commit

Permalink
feat(root): add function: support loadbalancer
Browse files Browse the repository at this point in the history
  • Loading branch information
xishengcai committed Oct 25, 2022
1 parent f457a0b commit 8a92c42
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
2 changes: 2 additions & 0 deletions apis/core/v1alpha2/core_workload_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ type ContainerizedWorkloadSpec struct {
// More info: https://kubernetes.io/docs/concepts/services-networking/service/
// +optional
ServiceType corev1.ServiceType `json:"serviceType,omitempty"`

ServiceAnnotation map[string]string `json:"serviceAnnotation,omitempty"`
}

type Dependency struct {
Expand Down
7 changes: 7 additions & 0 deletions apis/core/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ if [ -z "$VERSION" ]; then
fi

if [ -z "$IMAGE_REPO" ]; then
# IMAGE_REPO='registry.cn-beijing.aliyuncs.com/launcher-agent-only-dev'
IMAGE_REPO='registry.cn-hangzhou.aliyuncs.com/launcher-agent-only-test'
IMAGE_REPO='registry.cn-beijing.aliyuncs.com/launcher-agent-only-dev'
# IMAGE_REPO='registry.cn-hangzhou.aliyuncs.com/launcher-agent-only-test'
fi

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/${BIN_FILE} ./main.go
Expand Down
4 changes: 2 additions & 2 deletions charts/oam-kubernetes-runtime/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.81.0
version: 0.91.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 0.1
appVersion: 3.9.3
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,10 @@ spec:
pointToGrayName:
description: old grey workload name need modify match selector
type: string
serviceAnnotation:
additionalProperties:
type: string
type: object
serviceMesh:
description: check add istio label
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func (r *Reconciler) renderService(ctx context.Context,
return nil, nil
}
service.Namespace = workload.Namespace
service.Annotations = workload.Spec.ServiceAnnotation
if err := ctrl.SetControllerReference(workload, service, r.Scheme); err != nil {
return nil, err
}
Expand Down

0 comments on commit 8a92c42

Please sign in to comment.