forked from LaconicNetwork/kompose
Fix openshift DeploymentConfig and ImageStream APIVersions (#1598)
* fix openshift dc and image stream api version Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> * e2e: Update Openshift manifests to update the API Version Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> --------- Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
This commit is contained in:
@@ -79,7 +79,7 @@ func (o *OpenShift) initImageStream(name string, service kobject.ServiceConfig,
|
||||
is := &imageapi.ImageStream{
|
||||
TypeMeta: kapi.TypeMeta{
|
||||
Kind: "ImageStream",
|
||||
APIVersion: "v1",
|
||||
APIVersion: "image.openshift.io/v1",
|
||||
},
|
||||
ObjectMeta: kapi.ObjectMeta{
|
||||
Name: name,
|
||||
@@ -172,7 +172,7 @@ func (o *OpenShift) initDeploymentConfig(name string, service kobject.ServiceCon
|
||||
dc := &deployapi.DeploymentConfig{
|
||||
TypeMeta: kapi.TypeMeta{
|
||||
Kind: "DeploymentConfig",
|
||||
APIVersion: "v1",
|
||||
APIVersion: "apps.openshift.io/v1",
|
||||
},
|
||||
ObjectMeta: kapi.ObjectMeta{
|
||||
Name: name,
|
||||
|
||||
@@ -105,6 +105,11 @@ func TestInitDeploymentConfig(t *testing.T) {
|
||||
if spec.Spec.Triggers[1].ImageChangeParams.ContainerNames[0] != "myfoobarname" {
|
||||
t.Errorf("Expected myfoobarname for name, actual %s", spec.Spec.Triggers[1].ImageChangeParams.ContainerNames[0])
|
||||
}
|
||||
|
||||
// Check that the APIVersion is equal to "apps.openshift.io/v1"
|
||||
if spec.APIVersion != "apps.openshift.io/v1" {
|
||||
t.Errorf("Expected 'apps.openshift.io/v1' for APIVersion, actual %s", spec.APIVersion)
|
||||
}
|
||||
}
|
||||
|
||||
func TestKomposeConvertRoute(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user