[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Integrating HPA in application template

Can you provide your full template and the commands you are running?

I modified an existing template to add your HPA object and I was able to both oc process it, and oc create the objects that resulted from oc process.

Supplying your "oc version" might be helpful as well.

On Mon, Feb 15, 2016 at 8:58 AM, Alejandro Nieto Boza <ale90nb gmail com> wrote:

I'm trying to integrate a hpa in a application template with other resources like ImageStreams, Routes, DeploymentConfigs... These resources use apiversion v1.

          "kind": "HorizontalPodAutoscaler",
          "apiVersion": "extensions/v1beta1",

          "metadata": {
            "name": "${SERVICE}"
          "spec": {
            "scaleRef": {
              "kind": "DeploymentConfig",
              "name": "${SERVICE}",
              "apiVersion": "v1",
              "subresource": "scale"
            "minReplicas": 1,
            "maxReplicas": 3,
            "cpuUtilization": {
              "targetPercentage": 50

When I launch the template this error appears to me:

Cannot create object. Unrecognized kind HorizontalPodAutoscaler

I've tried changing the apiVersion of Template:

    "kind": "Template",
    "apiVersion": "extensions/v1beta1",

But then this error appears:

unable to load "template.json": no kind "Template" is registered for version "extensions/v1beta1"

And also I've tried changing the API of HPA to v1. It doesn't work. 

Is it possible to integrate the hpa with the other resources?

I've tried with the hpa in a separated template and it works perfectly.

users mailing list
users lists openshift redhat com

Ben Parees | OpenShift

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]