How do I use Spring Cloud Kubernetes to programmatically write a ConfigMap value? - spring

I have a service that uses Spring Cloud Kubernetes Config to reload its configuration when a value in a ConfigMap changes. That all works great.
Is it possible to use Spring Cloud Kubernetes (or one of its dependencies) to write a ConfigMap value? I didn't see any examples of this in the documentation (here). Can I do this programmatically, or do I need to call the underlying Kubernetes APIs to do this?

Based on Eugene's reply:
No, this is impossible at the moment to do so. You can go to GitHub and create an issue with the explanation of your use case, and this feature can be created within the future releases.

Related

How to deploy Spring Cloud Data Flow on AWS EKS

Are there any document for deploying Spring Cloud Data Flow on AWS EKS? I am looking for example or guide video about this problem.
There are no special instructions for running SCDF on EKS or any other K8s distribution. As far as you have a K8s cluster and the necessary service accounts, you will be able to provision SCDF on a given namespace.
You can either use the release-tagged deployment YAMLs directly or the SCDF's Bitnami Helm chart. Depending on your customization needs, you'll find the deployment YAMLs more flexible, though.

Cloudfoundry-UAA for SCDF Kubernetes

This question may seem dumb. But still asking as I couldn't narrow down the proper solution. I have the scdf running in openshift platform. I'm trying to set up the authentication and authorization mechanisms as per Security section given in spring-cloud-dataflow documentation.
Could the same documentation be used for kubernetes as well ? Because I see some notes like it's specific for cloudfoundry and no mention of kubernetes was found in security section.
Could the same documentation be used for kubernetes as well ? Because I see some notes like it's specific for cloudfoundry and no mention of kubernetes was found in security section.
No, the current UAA documentation setup is only for Cloud Foundry. The UAA support for Kubernetes is TBD.

confusion about Spring Data Flow Server

I'm confused about Spring Cloud Data Flow Server deployment...
We are planning to run it on cloudfoundry, and the instructions say one should download the final server artifact (a jar) and deploy it.
On the other hand another section in the documentation describes a way on how to customize the provisioning of roles to users with some custom code. But there is no explanation on how to embed the server in a custom application so I can provide my code (via #Bean).
On a very old blog post I found a mention of #EnableDataFlowServer but this annotation is not described in the official documentation anymore - is it still valid?
There is also no way described how I could use any other security then oauth, do I really need to use oauth? how about using my own security config or even only basic authentication?
I kind of expected the same flexibility as spring cloud config server provides...
You can check the Spring Cloud Data Flow site on how to install SCDF on Cloud Foundry. The instructions in this site have the correct information set up SCDF on CF.
The #EnableDataFlowServer is intended for customizing Spring Cloud Data Flow server using/overriding the existing DataFlowServerAutoConfiguration and DataFlowControllerAutoConfiguration. This is not specific to CF though.

How to practice with Spring cloud in local machine?

I am new and just started to explore Spring Cloud. Would like to know how to practice with examples in local (laptop). It appears to need a cloud environment. And most of them are available only for few days. So any pointers to try out features like
Distributed/versioned configuration, Service registration and discovery ,Routing Service-to-service calls, Load balancing Circuit and Breakers Global locks
You can check out the Spring guides where we guide you, step by step, to achieve what you have described. You can check out the link here for the Ribbon guide -
https://spring.io/guides/gs/client-side-load-balancing/ and the link to all of the guides https://spring.io/guides/
You can also check this blog, service discovery, routing and load balancing.
Spring Cloud, Eureka and Zuul
For Distributed/versioned configuration, check this one
Quick Intro to Spring Cloud Configuration
Also one example, that brings all of that together Spring Cloud Bootstrapping

Example for Spring Cloud Consul with Ribbon for client side load balancing

I see that spring-cloud-consul is live in spring.io [https://spring.io/blog/2015/05/27/spring-cloud-consul-1-0-0-m1-available-now] but I hardly see any reference examples.
I am mainly looking for Service Registration and Service Discovery with Consul and Ribbon as client side load balancer. Could someone give a sample application or an example to refer. I also checked in the git repository for spring-cloud-consul, didn't find any examples there[https://github.com/spring-cloud/spring-cloud-consul]
There is an example in the main repo, spring-cloud-consul-sample, that uses the LoadBalancerClient of which there is a ribbon implementation that will use consul to populate the server list.
I wasn't able to find much information about Consul and Ribbon, but I have found more information about Eueka (it's used by Netflix and it also does service registration/distcovery similiar to Consul). This Spring project seems to be a lot more active. Info about it can be found here: http://cloud.spring.io/spring-cloud-netflix/
This blog post demonstrates how to use spring cloud with Eueka and Ribbon: https://spring.io/blog/2015/07/14/microservices-with-spring
There is also a repo for the tutorial: https://github.com/paulc4/microservices-demo
If you still want to use Consul instead of Eueka, here is a sample project, you should be able to use this along with the blog post above to build a working example: https://github.com/spring-cloud/spring-cloud-consul/tree/master/spring-cloud-consul-sample
I wrote a demo project using Spring Cloud Consul and Spring Cloud Netflix.
I'm using Consul as a service registry, and Ribbon/Hystrix/Feign are used to simplify API service clients.
The project is hosted on GitHub: https://github.com/alexandreroman/number2words.

Resources