donovanmuller / spring-cloud-deployer-openshift

A Spring Cloud Deployer SPI implementation for OpenShift 3
http://blog.switchbit.io/spring-cloud-deployer-openshift
Apache License 2.0
4 stars 10 forks source link

Not able to pass custom spring.cloud.deployer.kubernetes.serviceAnnotations property #45

Closed ravindrabhatt closed 6 years ago

ravindrabhatt commented 6 years ago

stream deploy --name streamName --properties "app.custom.spring.cloud.deployer.openshift.serviceAnnotations=name:value" OR task launch --name --properties "app.custom.spring.cloud.deployer.openshift.serviceAnnotations=name:value"

does not add the name->value entry under annotations tag of deployment config of app even though kubernetes deployer supports it .

Event tried "app.custom.spring.cloud.deployer.kubernetes.serviceAnnotations=name:value"

See getAnnotations method at https://github.com/spring-cloud/spring-cloud-deployer-kubernetes/blob/master/src/main/java/org/springframework/cloud/deployer/spi/kubernetes/KubernetesAppDeployer.java

donovanmuller commented 6 years ago

Thanks for creating the issue 👍

The support for Service annotations was added in 1.2.2.RELEASE of spring-cloud-deployer-kubernetes. The current release (1.2.0.RELEASE) used by this OpenShift deployer is 1.2.1.RELEASE and hence your issue.

I will update to the 1.2.2.RELEASE of spring-cloud-deployer-kubernetes and release 1.2.1.RELEASE as soon as I can (#44).

ravindrabhatt commented 6 years ago

Is there also a way to add pod level spec annotations?

We want to add an initContainer to the pod that gets deployed as part of stream pipeline, is it possible with current openshift deployer?

donovanmuller commented 6 years ago

There is currently no support for Init Containers in the OpenShift deployer.

I have created a separate issue to investigate adding this.

ravindrabhatt commented 6 years ago

Ok Thanks

donovanmuller commented 6 years ago

@ravindrabhatt I have released 1.2.1.RELEASE with 1.2.2.RELEASE of spring-cloud-deployer-kubernetes.

You should now have the ability to pass app.custom.spring.cloud.deployer.openshift.serviceAnnotation deployment properties. Can you please test and verify that this is resolved?