question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add the posibility to dynamically set the number of replicas in the Kubernetes Deployment file

See original GitHub issue

Description

Let’s suppose I have a Jenkins pipeline pipeline with two stages deploy-staging and deploy-pro. sh "./mvnw fabric8:resource" generates a kubernetes.yaml file with this number of replicas:

  spec:
    replicas: 1

Now, image in want one replica for staging but n for production. I can manually do kubectl scale deployment --replicas=2 but as soon as I do mvn fabric8:apply with for instance a new image to use, the replicas will be downscaled to 1 again.

It’d be great to have a fabric8.replicas property to allow us to override this value.

Info

  • f-m-p version : 3.5.41

  • Maven version (mvn -v) : Apache Maven 3.5.3

  • Kubernetes / OpenShift setup and version : Kubernetes 1.11

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rohanKanojiacommented, Mar 4, 2020

Seems like a regression, we split DefaultControllerEnricher to two enrichers in 4.x versions. Could you please provide a reproducible sample if possible? We’ll try to fix it before next release(coming in 1-2 weeks)

0reactions
stale[bot]commented, Jun 5, 2020

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReplicaSet - Kubernetes
A ReplicaSet ensures that a specified number of pod replicas are running at any given time. However, a Deployment is a higher-level concept ......
Read more >
Using Kubernetes ConfigMap Resources for Dynamic Apps
ConfigMap is one declarative configuration feature in Kubernetes, ... can be used to dynamically add or change files used by containers.
Read more >
kubernetes - k8s dynamically set number of replicas relative to ...
Is there a feature or param to put in my deployment yaml ( kind: Deployment ) to tell k8s to deploy as many...
Read more >
Using Helm to Deploy Kubernetes to Multiple Environments
There are many ways to do that in Kubernetes (init containers, volumes) but the simplest one is via the use of configmaps. A...
Read more >
Kubernetes ReplicaSet | kubelabs - GitHub Pages
Scaling and Autoscaling ReplicaSets · Edit the controllers configuration by using kubectl edit rs ReplicaSet_name and change the replicas count up or down...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found