diff --git a/kubeless.jsonnet b/kubeless.jsonnet index 51a81f2b0..cd0f1b96c 100644 --- a/kubeless.jsonnet +++ b/kubeless.jsonnet @@ -312,6 +312,20 @@ local runtime_images ='[ ], "depName": "requirements.xml", "fileNameSuffix": ".cs" + }, + { + "ID": "php", + "versions": [ + { + "name": "php71", + "version": "7.1", + "httpImage": "paolomainardi/kubeless-php:latest", + "pubsubImage": "paolomainardi/kubeless-php:latest", + "initImage": "composer:1.6" + } + ], + "depName": "composer.json", + "fileNameSuffix": ".php" } ]'; diff --git a/pkg/langruntime/langruntime_test.go b/pkg/langruntime/langruntime_test.go index ed8503100..be0547c8b 100644 --- a/pkg/langruntime/langruntime_test.go +++ b/pkg/langruntime/langruntime_test.go @@ -96,7 +96,7 @@ func TestGetRuntimes(t *testing.T) { lr.ReadConfigMap() runtimes := strings.Join(lr.GetRuntimes(), ", ") - expectedRuntimes := "python2.7, python3.4, python3.6, nodejs6, nodejs8, ruby2.4, dotnetcore2.0" + expectedRuntimes := "python2.7, python3.4, python3.6, nodejs6, nodejs8, ruby2.4, dotnetcore2.0, php7.1" if runtimes != expectedRuntimes { t.Errorf("Expected %s but got %s", expectedRuntimes, runtimes) } diff --git a/pkg/langruntime/langruntimetestutils.go b/pkg/langruntime/langruntimetestutils.go index 544c33875..da3685504 100644 --- a/pkg/langruntime/langruntimetestutils.go +++ b/pkg/langruntime/langruntimetestutils.go @@ -84,6 +84,19 @@ func AddFakeConfig(clientset *fake.Clientset) { }, }, }, + }, {ID: "php", + DepName: "composer.json", + FileNameSuffix: ".php", + Versions: []RuntimeVersion{ + { + Name: "php7.1", + Version: "7.1", + InitImage: "composer:1.6", + ImagePullSecrets: []ImageSecret{ + {ImageSecret: "p1"}, {ImageSecret: "p2"}, + }, + }, + }, }} out, err := yaml.Marshal(runtimeImages)