Skip to content

Commit 15cc81c

Browse files
committed
Further chart updates
1 parent 28f4da1 commit 15cc81c

File tree

6 files changed

+40
-55
lines changed

6 files changed

+40
-55
lines changed

charts/fission-workflows/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v1
2-
name: fission-workflows-proxy
2+
name: fission-workflows
33
version: 0.6.0
44
appVersion: 0.6.0
55
description: Fission Workflows is a fast workflow engine for serverless functions on Kubernetes

charts/fission-workflows/templates/deployment.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,29 @@ spec:
9090
protocol: TCP
9191

9292
---
93+
# Legacy: add 'workflows-apiserver' service for Fission controller
94+
apiVersion: v1
95+
kind: Service
96+
metadata:
97+
name: workflows-apiserver
98+
namespace: {{ .Release.Namespace }}
99+
labels:
100+
svc: {{ .Values.service.name }}
101+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
102+
spec:
103+
type: {{ .Values.service.type }}
104+
selector:
105+
svc: {{ .Values.service.name }}
106+
ports:
107+
- name: http
108+
port: {{ .Values.service.ports.http }}
109+
targetPort: 8080
110+
protocol: TCP
111+
- name: grpc
112+
port: {{ .Values.service.ports.grpc }}
113+
targetPort: 5555
114+
protocol: TCP
115+
---
93116
#
94117
# Fission integration
95118
#

charts/fission-workflows/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ eventstore:
2727

2828
# Fission-related configuration
2929
fission:
30-
ns: fission # Remove
30+
ns: fission
3131
controller: http://controller
3232
executor: http://executor
3333
env:

pkg/apiserver/fission/envproxy_test.go

+12-51
Original file line numberDiff line numberDiff line change
@@ -13,81 +13,42 @@ import (
1313
"github.com/golang/protobuf/ptypes/empty"
1414
"github.com/stretchr/testify/assert"
1515
"github.com/stretchr/testify/mock"
16+
"google.golang.org/grpc"
1617
"k8s.io/apimachinery/pkg/apis/meta/v1"
1718
k8stypes "k8s.io/apimachinery/pkg/types"
1819
)
1920

20-
type mockInvocationServer struct {
21+
type mockWorkflowClient struct {
2122
mock.Mock
2223
}
2324

24-
func (m *mockInvocationServer) Invoke(ctx context.Context, spec *types.WorkflowInvocationSpec) (*types.ObjectMetadata, error) {
25-
args := m.Called(spec)
26-
id := spec.WorkflowId
27-
if len(id) == 0 {
28-
id = "randomUID"
29-
}
30-
return &types.ObjectMetadata{Id: args.String(0)}, args.Error(1)
31-
}
32-
33-
func (m *mockInvocationServer) InvokeSync(ctx context.Context, spec *types.WorkflowInvocationSpec) (*types.
34-
WorkflowInvocation, error) {
35-
args := m.Called(spec)
36-
return args.Get(0).(*types.WorkflowInvocation), args.Error(1)
37-
}
38-
39-
func (m *mockInvocationServer) Cancel(ctx context.Context, id *types.ObjectMetadata) (*empty.Empty, error) {
40-
args := m.Called(id)
41-
return &empty.Empty{}, args.Error(1)
42-
}
43-
44-
func (m *mockInvocationServer) List(ctx context.Context, _ *apiserver.InvocationListQuery) (*apiserver.WorkflowInvocationList, error) {
45-
args := m.Called()
46-
return args.Get(0).(*apiserver.WorkflowInvocationList), args.Error(1)
47-
}
48-
49-
func (m *mockInvocationServer) Get(ctx context.Context, id *types.ObjectMetadata) (*types.
50-
WorkflowInvocation, error) {
51-
args := m.Called(id)
52-
return args.Get(0).(*types.WorkflowInvocation), args.Error(1)
53-
}
54-
55-
func (m *mockInvocationServer) Validate(ctx context.Context, spec *types.WorkflowInvocationSpec) (*empty.Empty, error) {
56-
args := m.Called(spec)
57-
return &empty.Empty{}, args.Error(1)
58-
}
59-
60-
type mockWorkflowServer struct {
61-
mock.Mock
62-
}
63-
64-
func (m *mockWorkflowServer) Create(ctx context.Context, spec *types.WorkflowSpec) (*types.ObjectMetadata, error) {
65-
args := m.Called(spec)
25+
func (m *mockWorkflowClient) Create(ctx context.Context, in *types.WorkflowSpec, opts ...grpc.CallOption) (*types.ObjectMetadata, error) {
26+
args := m.Called(in)
6627
return &types.ObjectMetadata{Id: args.String(0)}, args.Error(1)
6728
}
6829

69-
func (m mockWorkflowServer) List(ctx context.Context, _ *empty.Empty) (*apiserver.WorkflowList, error) {
30+
func (m *mockWorkflowClient) List(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*apiserver.WorkflowList, error) {
7031
args := m.Called()
7132
return args.Get(0).(*apiserver.WorkflowList), args.Error(1)
7233
}
7334

74-
func (m mockWorkflowServer) Get(ctx context.Context, id *types.ObjectMetadata) (*types.Workflow, error) {
75-
args := m.Called(id)
35+
func (m *mockWorkflowClient) Get(ctx context.Context, in *types.ObjectMetadata, opts ...grpc.CallOption) (*types.Workflow, error) {
36+
args := m.Called(in)
7637
return args.Get(0).(*types.Workflow), args.Error(1)
7738
}
7839

79-
func (m mockWorkflowServer) Delete(ctx context.Context, id *types.ObjectMetadata) (*empty.Empty, error) {
80-
args := m.Called(id)
40+
func (m *mockWorkflowClient) Delete(ctx context.Context, in *types.ObjectMetadata, opts ...grpc.CallOption) (*empty.Empty, error) {
41+
args := m.Called(in)
8142
return &empty.Empty{}, args.Error(1)
8243
}
8344

84-
func (m mockWorkflowServer) Validate(ctx context.Context, spec *types.WorkflowSpec) (*empty.Empty, error) {
85-
args := m.Called(spec)
45+
func (m *mockWorkflowClient) Validate(ctx context.Context, in *types.WorkflowSpec, opts ...grpc.CallOption) (*empty.Empty, error) {
46+
args := m.Called(in)
8647
return &empty.Empty{}, args.Error(1)
8748
}
8849

8950
func TestProxy_Specialize(t *testing.T) {
90-
workflowServer := &mockWorkflowServer{}
51+
workflowServer := &mockWorkflowClient{}
9152
workflowServer.On("Create", mock.Anything).Return("mockID", nil)
9253
env := NewEnvironmentProxyServer(nil, workflowServer)
9354
wf := &types.WorkflowSpec{

pkg/fnenv/fission/runtime.go

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ func (fe *FunctionEnv) Invoke(spec *types.TaskInvocationSpec, opts ...fnenv.Invo
103103
}
104104

105105
fnenv.FnActive.WithLabelValues(Name).Dec()
106-
fnenv.FnActive.WithLabelValues(Name).Inc()
107106

108107
ctxLog.Infof("Fission function response: %d - %s", resp.StatusCode, resp.Header.Get("Content-Type"))
109108
if logrus.GetLevel() == logrus.DebugLevel {

test/e2e/buildtest.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ DOCKER_REPO=gcr.io/fission-ci
1313
WORKFLOWS_ENV_IMAGE=${DOCKER_REPO}/workflow-env
1414
WORKFLOWS_BUILD_ENV_IMAGE=${DOCKER_REPO}/workflow-build-env
1515
WORKFLOWS_BUNDLE_IMAGE=${DOCKER_REPO}/fission-workflows-bundle
16+
WORKFLOWS_PROXY_IMAGE=${DOCKER_REPO}/workflows-proxy
1617
TAG=ci-test
1718
NS=fission
1819
NS_FUNCTION=fission-function
@@ -75,12 +76,13 @@ emph "Pushing images to container registry..."
7576
gcloud docker -- push ${WORKFLOWS_ENV_IMAGE}:${TAG}
7677
gcloud docker -- push ${WORKFLOWS_BUILD_ENV_IMAGE}:${TAG}
7778
gcloud docker -- push ${WORKFLOWS_BUNDLE_IMAGE}:${TAG}
79+
gcloud docker -- push ${WORKFLOWS_PROXY_IMAGE}:${TAG}
7880

7981
#
8082
# Deploy Fission Workflows
8183
# TODO use test specific namespace
8284
emph "Deploying Fission Workflows '${fissionWorkflowsHelmId}' to ns '${NS}'..."
83-
helm_install_fission_workflows ${fissionWorkflowsHelmId} ${NS} "pullPolicy=Always,tag=${TAG},bundleImage=${WORKFLOWS_BUNDLE_IMAGE},envImage=${WORKFLOWS_ENV_IMAGE},buildEnvImage=${WORKFLOWS_BUILD_ENV_IMAGE}"
85+
helm_install_fission_workflows ${fissionWorkflowsHelmId} ${NS} "pullPolicy=Always,tag=${TAG},bundleImage=${WORKFLOWS_BUNDLE_IMAGE},fission.env.runtimeImage=${WORKFLOWS_PROXY_IMAGE},fission.env.builderImage=${WORKFLOWS_BUILD_ENV_IMAGE}"
8486

8587
# Wait for Fission Workflows to get ready
8688
fission-workflows config

0 commit comments

Comments
 (0)