Feature Request
Deploying multiple versions of the same application in the same cluster is a common practice in order to allow progressive transfer of traffic from the old to the new version over time, for instance, allowing a team to "test in production" with 5% of traffic going to a new release while 95% remains in the older release.
Is your feature request related to a problem?
Yes, for Istio service meshes, which support this concept natively through the usage of the label "version". appsody deploy always removes the old version of an app, there is no option to keep the previous version deployed.
One could try and rename the Appsody application in the app-deploy.yaml, but then Appsody will create two Service objects when what we want is a single Service object with a selector that matches all pods representing all the different versions of the application, such as in the snippet below pulled out of an Istio sample :
apiVersion: v1
kind: Service
metadata:
name: reviews
labels:
app: reviews
service: reviews
spec:
ports:
- port: 9080
name: http
selector:
app: reviews
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: reviews-v1
labels:
app: reviews
version: v1
spec:
replicas: 1
selector:
matchLabels:
app: reviews
version: v1
template:
metadata:
labels:
app: reviews
version: v1
spec:
serviceAccountName: bookinfo-reviews
containers:
- name: reviews
image: docker.io/istio/examples-bookinfo-reviews-v1:1.15.0
ports:
- containerPort: 9080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: reviews-v2
labels:
app: reviews
version: v2
spec:
replicas: 1
selector:
matchLabels:
app: reviews
version: v2
template:
metadata:
labels:
app: reviews
version: v2
spec:
serviceAccountName: bookinfo-reviews
containers:
- name: reviews
image: docker.io/istio/examples-bookinfo-reviews-v2:1.15.0
ports:
- containerPort: 9080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: reviews-v3
labels:
app: reviews
version: v3
spec:
replicas: 1
selector:
matchLabels:
app: reviews
version: v3
template:
metadata:
labels:
app: reviews
version: v3
spec:
serviceAccountName: bookinfo-reviews
containers:
- name: reviews
image: docker.io/istio/examples-bookinfo-reviews-v3:1.15.0
ports:
- containerPort: 9080
Describe the solution you'd like
Istio prescribes the usage of the app label to tie various Deployment objects to the same logical application inside the service mesh, and the usage of the version label to distinguish each Deployment version. With all deployments labeled with app and version labels, Istio then requires a single Service object with a selector for the app label (see above snippet).
The AppsodyOperator already allows the addition of the app and label versions to the AppsodyApplication object, so we need a mechanism to achieve that arrangement with a single Service using a selector matching all the Deployment objects.
As a current workaround, one could ignore the Service objects created by the Appsody operator and create their own Service object with a selector tied to the Istio app and version labels in the multiple AppsodyApplication objects representing the multiple versions of the logical application.
Feature Request
Deploying multiple versions of the same application in the same cluster is a common practice in order to allow progressive transfer of traffic from the old to the new version over time, for instance, allowing a team to "test in production" with 5% of traffic going to a new release while 95% remains in the older release.
Is your feature request related to a problem?
Yes, for Istio service meshes, which support this concept natively through the usage of the label "version".
appsody deployalways removes the old version of an app, there is no option to keep the previous version deployed.One could try and rename the Appsody application in the app-deploy.yaml, but then Appsody will create two
Serviceobjects when what we want is a singleServiceobject with a selector that matches all pods representing all the different versions of the application, such as in the snippet below pulled out of an Istio sample :Describe the solution you'd like
Istio prescribes the usage of the
applabel to tie variousDeploymentobjects to the same logical application inside the service mesh, and the usage of theversionlabel to distinguish eachDeploymentversion. With all deployments labeled withappandversionlabels, Istio then requires a singleServiceobject with a selector for theapplabel (see above snippet).The AppsodyOperator already allows the addition of the
appandlabelversions to theAppsodyApplicationobject, so we need a mechanism to achieve that arrangement with a singleServiceusing a selector matching all theDeploymentobjects.As a current workaround, one could ignore the
Serviceobjects created by the Appsody operator and create their ownServiceobject with a selector tied to the Istioappandversionlabels in the multipleAppsodyApplicationobjects representing the multiple versions of the logical application.