How to use the kubernetes-models/autoscaling/v1.HorizontalPodAutoscaler function in kubernetes-models

To help you get started, we’ve selected a few kubernetes-models examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tommy351 / kosko / examples / template-component / components / nginx_hpa.js View on Github external
"use strict";

const { HorizontalPodAutoscaler } = require("kubernetes-models/autoscaling/v1");

module.exports = new HorizontalPodAutoscaler({
  metadata: {
    name: "nginx"
  spec: {
    scaleTargetRef: {
      apiVersion: "apps/v1",
      kind: "Deployment",
      name: "nginx"
    minReplicas: 2,
    maxReplicas: 6,
    targetCPUUtilizationPercentage: 70