Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
updated langruntime to make use of configmap
Browse files Browse the repository at this point in the history
  • Loading branch information
paolomainardi committed Feb 6, 2018
1 parent 4532aae commit 9108593
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
14 changes: 14 additions & 0 deletions kubeless.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]';

Expand Down
2 changes: 1 addition & 1 deletion pkg/langruntime/langruntime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
13 changes: 13 additions & 0 deletions pkg/langruntime/langruntimetestutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9108593

Please sign in to comment.