Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build docker image #925

Merged
merged 4 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ IMG ?= registry.aliyuncs.com/fluid/runtime-controller
CRD_OPTIONS ?= "crd:trivialVersions=true"

# The Image URL to use in docker build and push
DATASET_CONTROLLER_IMG ?= registry.aliyuncs.com/fluid/dataset-controller
ALLUXIORUNTIME_CONTROLLER_IMG ?= registry.aliyuncs.com/fluid/alluxioruntime-controller
JINDORUNTIME_CONTROLLER_IMG ?= registry.aliyuncs.com/fluid/jindoruntime-controller
GOOSEFSRUNTIME_CONTROLLER_IMG ?= registry.aliyuncs.com/fluid/goosefsruntime-controller
CSI_IMG ?= registry.aliyuncs.com/fluid/fluid-csi
LOADER_IMG ?= registry.aliyuncs.com/fluid/fluid-dataloader
INIT_USERS_IMG ?= registry.aliyuncs.com/fluid/init-users
WEBHOOK_IMG ?= registry.aliyuncs.com/fluid/fluid-webhook
# IMG_REPO ?= registry.aliyuncs.com/fluid
IMG_REPO ?= fluidcloudnative
DATASET_CONTROLLER_IMG ?= ${IMG_REPO}/dataset-controller
ALLUXIORUNTIME_CONTROLLER_IMG ?= ${IMG_REPO}/alluxioruntime-controller
JINDORUNTIME_CONTROLLER_IMG ?= ${IMG_REPO}/jindoruntime-controller
GOOSEFSRUNTIME_CONTROLLER_IMG ?= ${IMG_REPO}/goosefsruntime-controller
CSI_IMG ?= ${IMG_REPO}/fluid-csi
LOADER_IMG ?= ${IMG_REPO}/fluid-dataloader
INIT_USERS_IMG ?= ${IMG_REPO}/init-users
WEBHOOK_IMG ?= ${IMG_REPO}/fluid-webhook

LOCAL_FLAGS ?= -gcflags=-l
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
Expand Down Expand Up @@ -166,8 +168,8 @@ docker-push-init-users: docker-build-init-users
docker-push-webhook: docker-build-webhook
docker push ${WEBHOOK_IMG}:${GIT_VERSION}

docker-build-all: docker-build-dataset-controller docker-build-alluxioruntime-controller docker-build-jindoruntime-controller docker-build-goosefsruntime-controller docker-build-csi docker-build-init-users fluid-build-webhook
docker-push-all: docker-push-dataset-controller docker-push-alluxioruntime-controller docker-push-jindoruntime-controller docker-push-jindoruntime-controller docker-push-csi docker-push-init-users docker-push-webhook
docker-build-all: docker-build-dataset-controller docker-build-alluxioruntime-controller docker-build-jindoruntime-controller docker-build-goosefsruntime-controller docker-build-csi docker-build-init-users fluid-build-webhook docker-build-goosefsruntime-controller
docker-push-all: docker-push-dataset-controller docker-push-alluxioruntime-controller docker-push-jindoruntime-controller docker-push-jindoruntime-controller docker-push-csi docker-push-init-users docker-push-webhook docker-push-goosefsruntime-controller

# find or download controller-gen
# download controller-gen if necessary
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid/fluid/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ version: 0.6.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.6.0-4ded84e
appVersion: 0.6.0-4ca123f
home: https://github.com/fluid-cloudnative/fluid
keywords:
- category:data
Expand Down
20 changes: 10 additions & 10 deletions charts/fluid/fluid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ workdir: /tmp

dataset:
controller:
image: registry.aliyuncs.com/fluid/dataset-controller:v0.6.0-4ded84e
image: fluidcloudnative/dataset-controller:v0.6.0-4ca123f

csi:
registrar:
image: registry.aliyuncs.com/acs/csi-node-driver-registrar:v1.2.0
plugins:
image: registry.aliyuncs.com/fluid/fluid-csi:v0.6.0-4ded84e
image: fluidcloudnative/fluid-csi:v0.6.0-4ca123f
kubelet:
rootDir: /var/lib/kubelet

Expand All @@ -23,9 +23,9 @@ runtime:
portRange: 20000-26000
enabled: true
init:
image: registry.aliyuncs.com/fluid/init-users:v0.6.0-4ded84e
image: fluidcloudnative/init-users:v0.6.0-4ca123f
controller:
image: registry.aliyuncs.com/fluid/alluxioruntime-controller:v0.6.0-4ded84e
image: fluidcloudnative/alluxioruntime-controller:v0.6.0-4ca123f
runtime:
image: registry.aliyuncs.com/alluxio/alluxio:release-2.5.0-2-SNAPSHOT-52ad95c
fuse:
Expand All @@ -39,21 +39,21 @@ runtime:
fuse:
image: registry.cn-shanghai.aliyuncs.com/jindofs/jindo-fuse:3.6.0
controller:
image: registry.aliyuncs.com/fluid/jindoruntime-controller:v0.6.0-4ded84e
image: fluidcloudnative/jindoruntime-controller:v0.6.0-4ca123f
goosefs:
runtimeWorkers: 3
portRange: 26000-32000
enabled: true
init:
image: registry.aliyuncs.com/fluid/init-users:v0.6.0-6a86b3f
image: fluidcloudnative/init-users:v0.6.0-4ca123f
controller:
image: registry.aliyuncs.com/fluid/goosefsruntime-controller:v0.6.0-1c81860
image: fluidcloudnative/goosefsruntime-controller:v0.6.0-4ca123f
runtime:
image: registry.aliyuncs.com/fluid/goosefs:v1.0.1
image: fluidcloudnative/goosefs:v1.0.1
fuse:
image: registry.aliyuncs.com/fluid/goosefs-fuse:v1.0.1
image: fluidcloudnative/goosefs-fuse:v1.0.1

webhook:
enabled: false
image: registry.aliyuncs.com/fluid/fluid-webhook:v0.6.0-4ded84e
image: fluidcloudnative/fluid-webhook:v0.6.0-4ca123f

35 changes: 17 additions & 18 deletions pkg/ddc/alluxio/port_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ monitoring: alluxio_runtime_metrics
`

func TestGetReservedPorts(t *testing.T) {
configMap := &v1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: "hbase-alluxio-values",
configMap := &v1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: "hbase-alluxio-values",
Namespace: "fluid",
},
Data: map[string]string{
Expand All @@ -134,33 +134,32 @@ func TestGetReservedPorts(t *testing.T) {
dataSets := []*v1alpha1.Dataset{
{
ObjectMeta: metav1.ObjectMeta{
Name: "hbase",
Name: "hbase",
Namespace: "fluid",
},
Status: v1alpha1.DatasetStatus{
Runtimes: []v1alpha1.Runtime{
Runtimes: []v1alpha1.Runtime{
{
Name: "hbase",
Name: "hbase",
Namespace: "fluid",
Type: "alluxio",
Type: "alluxio",
},
},

},
},
{
ObjectMeta: metav1.ObjectMeta{
Name: "no-runtime",
Name: "no-runtime",
Namespace: "fluid",
},
},
{
ObjectMeta: metav1.ObjectMeta{
Name: "runtime-type",
Name: "runtime-type",
Namespace: "fluid",
},
Status: v1alpha1.DatasetStatus{
Runtimes: []v1alpha1.Runtime{
Runtimes: []v1alpha1.Runtime{
{
Type: "not-alluxio",
},
Expand All @@ -169,27 +168,27 @@ func TestGetReservedPorts(t *testing.T) {
},
{
ObjectMeta: metav1.ObjectMeta{
Name: "no-map",
Name: "no-map",
Namespace: "fluid",
},
Status: v1alpha1.DatasetStatus{
Runtimes: []v1alpha1.Runtime{
Runtimes: []v1alpha1.Runtime{
{
Type: "alluxio",
},
},
},
},
}
runtimeObjs := []runtime.Object{}
runtimeObjs = append(runtimeObjs, configMap)
runtimeObjs := []runtime.Object{}
runtimeObjs = append(runtimeObjs, configMap)
for _, dataSet := range dataSets {
runtimeObjs = append(runtimeObjs, dataSet.DeepCopy())
}
fakeClient := fake.NewFakeClientWithScheme(testScheme,runtimeObjs...)
fakeClient := fake.NewFakeClientWithScheme(testScheme, runtimeObjs...)
wantPorts := []int{20000, 20001, 20002, 20003, 20004, 20005, 20006, 20007, 20008}
ports,err := GetReservedPorts(fakeClient)
if err!=nil{
ports, err := GetReservedPorts(fakeClient)
if err != nil {
t.Errorf("GetReservedPorts failed.")
}
if !reflect.DeepEqual(ports, wantPorts) {
Expand Down