##---
# Source: spinnaker/templates/configmap/spinnaker-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: RELEASE-NAME-spinnaker-spinnaker-config
  labels:
    app: RELEASE-NAME-spinnaker
data:
  clouddriver.yml: |
    server:
      port: ${services.clouddriver.port:7002}
      address: ${services.clouddriver.host:localhost}

    redis:
      connection: ${services.redis.connection:redis://localhost:6379}

    udf:
      # Controls whether UserDataProviders are used to populate user data of new
      # server groups. If false, user data is copied over from ancestor server
      # groups on both CopyLastAsgAtomicOperation and
      # ModifyAsgLaunchConfigurationOperation (only if no user data is provided
      # on the given request).
      enabled: ${services.clouddriver.aws.udf.enabled:true}

    default:
      account:
        env: ${providers.aws.primaryCredentials.name}

    aws:
      # AWS Credentials are passed either as environment variables or through
      # a standard AWS file $HOME/.aws/credentials
      # See providers.aws.primaryCredentials in spinnaker.yml for more
      # info on setting environment variables.
      enabled: ${providers.aws.enabled:false}
      defaults:
        iamRole: ${provider.aws.defaultIAMRole:BaseIAMRole}
      defaultRegions:
        - name: ${providers.aws.defaultRegion:us-east-1}
      defaultFront50Template: ${services.front50.baseUrl}
      defaultKeyPairTemplate: ${providers.aws.defaultKeyPairTemplate}

    azure:
      enabled: ${providers.azure.enabled:false}

      accounts:
        - name: ${providers.azure.primaryCredentials.name}
          clientId: ${providers.azure.primaryCredentials.clientId}
          appKey: ${providers.azure.primaryCredentials.appKey}
          tenantId: ${providers.azure.primaryCredentials.tenantId}
          subscriptionId: ${providers.azure.primaryCredentials.subscriptionId}

    google:
      enabled: ${providers.google.enabled:false}

      accounts:
        - name: ${providers.google.primaryCredentials.name}
          project: ${providers.google.primaryCredentials.project}
          jsonPath: ${providers.google.primaryCredentials.jsonPath}

    cf:
      enabled: ${providers.cf.enabled:false}

      accounts:
        - name: ${providers.cf.primaryCredentials.name}
          api: ${providers.cf.primaryCredentials.api}
          console: ${providers.cf.primaryCredentials.console}
          org: ${providers.cf.defaultOrg}
          space: ${providers.cf.defaultSpace}
          username: ${providers.cf.account.name:}
          password: ${providers.cf.account.password:}

    kubernetes:
      enabled: ${providers.kubernetes.enabled:false}
      accounts:
        - name: local
          serviceAccount: true
          dockerRegistries:
            - accountName: dockerhub
    dockerRegistry:
      
      enabled: true
      accounts:
        - name: dockerhub
          address: https://index.docker.io
          repositories:
            - library/alpine
            - library/ubuntu
            - library/centos
            - library/nginx
      

    credentials:
      primaryAccountTypes: ${providers.aws.primaryCredentials.name}, ${providers.google.primaryCredentials.name}, ${providers.cf.primaryCredentials.name}, ${providers.azure.primaryCredentials.name}
      challengeDestructiveActionsEnvironments: ${providers.aws.primaryCredentials.name}, ${providers.google.primaryCredentials.name}, ${providers.cf.primaryCredentials.name}, ${providers.azure.primaryCredentials.name}

  echo.yml: |
    server:
      port: ${services.echo.port:8089}
      address: 0.0.0.0
    
    cassandra:
      enabled: false
      embedded: true
      host: ${services.cassandra.host:localhost}
    
    spinnaker:
      baseUrl: ${services.deck.baseUrl}
      cassandra:
         enabled: ${services.echo.cassandra.enabled:true}
      inMemory:
         enabled: ${services.echo.inMemory.enabled:false}
    
    front50:
      baseUrl: ${services.front50.baseUrl:http://localhost:8080}
    
    orca:
      baseUrl: ${services.orca.baseUrl:http://localhost:8083}
    
    endpoints.health.sensitive: false
    
    slack:
      enabled: ${services.echo.notifications.slack.enabled:false}
      token: ${services.echo.notifications.slack.token}
    
    spring:
      mail:
        host: ${services.echo.notifications.mail.host}
        port: ${services.echo.notifications.mail.port}
        username: ${services.echo.notifications.mail.username}
        password: ${services.echo.notifications.mail.password}
        properties:
          mail:
            smtp:
              auth:  ${services.echo.notifications.mail.auth:true}
              ssl:
                enable: ${services.echo.notifications.mail.ssl:true}
    mail:
      enabled: ${services.echo.notifications.mail.enabled:false}
      host: ${services.echo.notifications.mail.host}
      from: ${services.echo.notifications.mail.fromAddress}
    
    hipchat:
      enabled: ${services.echo.notifications.hipchat.enabled:false}
      baseUrl: ${services.echo.notifications.hipchat.url}
      token: ${services.echo.notifications.hipchat.token}
    
    twilio:
      enabled: ${services.echo.notifications.sms.enabled:false}
      baseUrl: ${services.echo.notifications.sms.url:https://api.twilio.com/}
      account: ${services.echo.notifications.sms.account}
      token: ${services.echo.notifications.sms.token}
      from: ${services.echo.notifications.sms.from}
    
    scheduler:
      enabled: ${services.echo.cron.enabled:true}
      threadPoolSize: 20
      triggeringEnabled: true
      pipelineConfigsPoller:
        enabled: true
        pollingIntervalMs: 30000
      cron:
        timezone: ${services.echo.cron.timezone}
    
  echo-local.yml: |
    server:
      port: ${services.echo.port:8089}
      address: 0.0.0.0
    
    cassandra:
      enabled: false
    
    spinnaker:
      inMemory:
        enabled: true
      cassandra:
        enabled: false
    
    front50:
      baseUrl: ${services.front50.baseUrl:http://localhost:8080}
    
    orca:
      baseUrl: ${services.orca.baseUrl:http://localhost:8083}
    
    endpoints.health.sensitive: false
    
    slack:
      enabled: ${services.echo.notifications.slack.enabled:false}
      token: ${services.echo.notifications.slack.token}
    
    spring:
      mail:
        host: ${services.echo.notifications.mail.host}
        port: ${services.echo.notifications.mail.port}
        username: ${services.echo.notifications.mail.username}
        password: ${services.echo.notifications.mail.password}
        properties:
          mail:
            smtp:
              auth:  ${services.echo.notifications.mail.auth:true}
              ssl:
                enable: ${services.echo.notifications.mail.ssl:true}
    
    mail:
      enabled: ${services.echo.notifications.mail.enabled:false}
      host: ${services.echo.notifications.mail.host}
      from: ${services.echo.notifications.mail.fromAddress}
    
    hipchat:
      enabled: ${services.echo.notifications.hipchat.enabled:false}
      baseUrl: ${services.echo.notifications.hipchat.url}
      token: ${services.echo.notifications.hipchat.token}
    
    twilio:
      enabled: ${services.echo.notifications.sms.enabled:false}
      baseUrl: ${services.echo.notifications.sms.url:https://api.twilio.com/}
      account: ${services.echo.notifications.sms.account}
      token: ${services.echo.notifications.sms.token}
      from: ${services.echo.notifications.sms.from}
    
    scheduler:
      enabled: ${services.echo.cron.enabled:true}
      threadPoolSize: 20
      triggeringEnabled: true
      pipelineConfigsPoller:
        enabled: true
        pollingIntervalMs: 30000
    
  fiat.yml: |
    server:
      port: ${services.fiat.port:7003}
      address: 0.0.0.0
    
    redis:
      connection: ${services.redis.connection:redis://localhost:6379}
    
    auth:
      getAll:
        enabled: false
    
  fiat.yml-local: |
    
  front50.yml: |
    server:
      port: ${services.front50.port:8080}
      address: ${services.front50.host:localhost}
    
    cassandra:
      enabled: ${services.front50.cassandra.enabled:true}
      embedded: ${services.cassandra.embedded:false}
      host: ${services.cassandra.host:localhost}
    
    aws:
      simpleDBEnabled: ${providers.aws.simpleDBEnabled:false}
      defaultSimpleDBDomain: ${providers.aws.defaultSimpleDBDomain}
    
    spinnaker:
      cassandra:
        enabled: ${services.front50.cassandra.enabled:true}
        host: ${services.cassandra.host:localhost}
        port: ${services.cassandra.port:9042}
        cluster: ${services.cassandra.cluster:CASS_SPINNAKER}
        keyspace: front50
        name: global
    
      redis:
        enabled: ${services.front50.redis.enabled:false}
    
      gcs:
        enabled: ${services.front50.gcs.enabled:false}
        bucket: ${services.front50.storage_bucket:}
        # See https://cloud.google.com/storage/docs/managing-buckets#manage-class-location
        bucketLocation: ${services.front50.bucket_location:}
        rootFolder: ${services.front50.bucket_root:front50}
        project: ${providers.google.primaryCredentials.project}
        jsonPath: ${providers.google.primaryCredentials.jsonPath}
    
      aws:
        enabled: ${services.front50.s3.enabled:false}
        bucket: ${services.front50.storage_bucket:}
        rootFolder: ${services.front50.bucket_root:front50}
        endpoint: ${services.front50.s3.endpoint:}
    
  front50-local.yml: |
    server:
      port: ${services.front50.port:8080}
      address: 0.0.0.0
    
    aws:
      simpleDBEnabled: ${providers.aws.simpleDBEnabled:false}
      defaultSimpleDBDomain: ${providers.aws.defaultSimpleDBDomain}
    
    cassandra:
      enabled: false
    
    spinnaker:
      cassandra:
        enabled: false
      redis:
        enabled: false
      gcs:
        enabled: ${services.front50.gcs.enabled}
        project: ${services.front50.gcs.project}
        jsonPath: /root/.kube/account.json # Don't change this
        rootFolder: ${services.front50.bucket_root}
        bucket: ${services.front50.storage_bucket}
      s3:
        enabled: ${services.front50.s3.enabled}
        rootFolder: ${services.front50.bucket_root}
        bucket: ${services.front50.storage_bucket}
        endpoint: ${services.front50.s3.endpoint}
    
  gate.yml: |
    server:
      port: ${services.gate.port:8084}
      address: 0.0.0.0
      # ssl:
      #   enabled: false
      #   keyStore: /opt/spinnaker/gate-tls/keystore.jks
      #   keyStorePassword: password
      #   keyAlias: server

    # Circular references since we're already using 'services'
    # services:
    #   clouddriver:
    #     baseUrl: ${services.clouddriver.baseUrl:localhost:7002}
    #   orca:
    #     baseUrl: ${services.orca.baseUrl:localhost:8083}
    #   front50:
    #     baseUrl: ${services.front50.baseUrl:localhost:8080}
    # #optional services:
    #   echo:
    #     enabled: ${services.echo.enabled:true}
    #     baseUrl: ${services.echo.baseUrl:8089}
    #   flapjack:
    #     enabled: ${services.flapjack.enabled:false}
    #   igor:
    #     enabled: ${services.igor.enabled:false}
    #     baseUrl: ${services.igor.baseUrl:8088}

    cors:
      allowedOriginsPattern: ^https?://(?:localhost|127.0.0.1|[^/]+\.example\.com)(?::[1-9]\d*)?/?$

    redis:
      connection: ${services.redis.connection}
  igor.yml: |
    server:
      port: ${services.igor.port:8088}
      address: 0.0.0.0
    
    jenkins:
      enabled: ${services.jenkins.enabled:false}
      masters:
        - name: default
          address: ${services.jenkins.defaultMaster.baseUrl}
          username: ${services.jenkins.defaultMaster.username}
          password: ${services.jenkins.defaultMaster.password}
    
    travis:
      enabled: ${services.travis.enabled:false}
      masters:
        - name: ${services.travis.defaultMaster.name}
          baseUrl: ${services.travis.defaultMaster.baseUrl}
          address: ${services.travis.defaultMaster.address}
          githubToken: ${services.travis.defaultMaster.githubToken}
    
    dockerRegistry:
      enabled: true
    
    redis:
      connection: ${services.redis.connection:redis://localhost:6379}
    
    # Igor depends on Clouddriver and Echo. These are normally configured
    # in spinnaker[-local].yml (if present), otherwise, uncomment this.
    # services:
    #   clouddriver:
    #     baseUrl: ${services.clouddriver.baseUrl}
    #   echo:
    #     baseUrl: ${services.echo.baseUrl}
    
  igor-local.yml: |
    server:
      port: ${services.igor.port:8088}
      address: 0.0.0.0
    
    jenkins:
      enabled: ${services.jenkins.enabled:false}
      masters:
        - name: default
          address: ${services.jenkins.defaultMaster.baseUrl}
          username: ${services.jenkins.defaultMaster.username}
          password: ${services.jenkins.defaultMaster.password}
    
    dockerRegistry:
      enabled: true
    
    redis:
      connection: ${services.redis.connection:redis://localhost:6379}
      
    # Igor depends on Clouddriver and Echo. These are normally configured
    # in spinnaker[-local].yml (if present), otherwise, uncomment this.
    # services:
    #   clouddriver:
    #     baseUrl: ${services.clouddriver.baseUrl}
    #   echo:
    #     baseUrl: ${services.echo.baseUrl}
    
  orca.yml: |
    server:
        port: ${services.orca.port:8083}
        address: 0.0.0.0
    
    oort:
        baseUrl: ${services.oort.baseUrl:localhost:7002}
    front50:
        baseUrl: ${services.front50.baseUrl:localhost:8080}
    mort:
        baseUrl: ${services.mort.baseUrl:localhost:7002}
    kato:
        baseUrl: ${services.kato.baseUrl:localhost:7002}
    bakery:
        baseUrl: ${services.bakery.baseUrl:localhost:8087}
        extractBuildDetails: ${services.bakery.extractBuildDetails:true}
        propagateCloudProviderType: ${services.bakery.propagateCloudProviderType:true}
        allowMissingPackageInstallation: ${services.bakery.allowMissingPackageInstallation:false}
    echo:
        enabled: ${services.echo.enabled:false}
        baseUrl: ${services.echo.baseUrl:8089}
    
    igor:
        baseUrl: ${services.igor.baseUrl:8088}
    
    # TODO(duftler): Remove this once flex is conditionally-enabled in orca.
    flex:
      baseUrl: http://not-a-host
    
    default:
      bake:
        account: local
      securityGroups:
      vpc:
        securityGroups:
    
    redis:
      connection: ${services.redis.connection}
    
    tasks:
      executionWindow:
        timezone: ${services.orca.timezone}
    
    script:
      master: default # name of Jenkins master in Spinnaker
      job: run-script # from Jenkins job configuration
    
  orca-local.yml: |
    server:
        port: ${services.orca.port:8083}
        address: 0.0.0.0
    
    oort:
        baseUrl: ${services.oort.baseUrl:localhost:7002}
    front50:
        baseUrl: ${services.front50.baseUrl:localhost:8080}
    mort:
        baseUrl: ${services.mort.baseUrl:localhost:7002}
    kato:
        baseUrl: ${services.kato.baseUrl:localhost:7002}
    bakery:
        baseUrl: ${services.bakery.baseUrl:localhost:8087}
        extractBuildDetails: ${services.bakery.extractBuildDetails:true}
    echo:
        enabled: ${services.echo.enabled:false}
        baseUrl: ${services.echo.baseUrl:8089}
    
    igor:
        baseUrl: ${services.igor.baseUrl:8088}
    
    # TODO(duftler): Remove this once flex is conditionally-enabled in orca.
    flex:
      baseUrl: http://not-a-host
    
    default:
      bake:
        account: ${providers.aws.primaryCredentials.name}
      securityGroups:
      vpc:
        securityGroups:
    
    redis:
      connection: ${services.redis.connection}
    
    script:
      master: default # name of Jenkins master in Spinnaker
      job: run-script # from Jenkins job configuration
    
  rosco.yml: |
    server:
      port: ${services.rosco.port:8087}
      address: 0.0.0.0
    
    redis:
      connection: ${services.redis.connection:redis://localhost:6379}
    
    aws:
      enabled: ${providers.aws.enabled:false}
    
    docker:
      enabled: ${services.docker.enabled:false}
      bakeryDefaults:
        targetRepository: ${services.docker.targetRepository}
    
    google:
      enabled: ${providers.google.enabled:false}
      accounts:
        - name: ${providers.google.primaryCredentials.name}
          project: ${providers.google.primaryCredentials.project}
          jsonPath: ${providers.google.primaryCredentials.jsonPath}
      gce:
        bakeryDefaults:
          zone: ${providers.google.defaultZone}
    
    rosco:
      configDir: ${services.rosco.configDir}
    
  rosco-local.yml: |
    server:
      port: ${services.rosco.port:8087}
      address: 0.0.0.0
    
    redis:
      connection: ${services.redis.connection:redis://localhost:6379}
    
    aws:
      enabled: ${providers.aws.enabled:false}
    
    docker:
      enabled: ${services.docker.enabled:false}
      bakeryDefaults:
        targetRepository: ${services.docker.targetRepository}
    
    google:
      enabled: ${providers.google.enabled:false}
      accounts:
        - name: ${providers.google.primaryCredentials.name}
          project: ${providers.google.primaryCredentials.project}
          jsonPath: ${providers.google.primaryCredentials.jsonPath}
      gce:
        bakeryDefaults:
          zone: ${providers.google.defaultZone}
    
    rosco:
      configDir: ${services.rosco.configDir}
    
  settings.js: |
    'use strict';

    var feedbackUrl = 'http://localhost';
    var gateHost = '/gate';
    var bakeryDetailUrl = gateHost + '/bakery/logs/global/{{ context.status.id }}';

    window.spinnakerSettings = {
      defaultProviders: ['kubernetes'],
      feedbackUrl: feedbackUrl,
      gateUrl: gateHost,
      bakeryDetailUrl: bakeryDetailUrl,
      pollSchedule: 30000,
      defaultTimeZone: 'America/Los_Angeles', // see http://momentjs.com/timezone/docs/#/data-utilities/
      providers: {
        kubernetes: {
          defaults: {
            account: 'local',
            namespace: 'default'
          },
        }
      },
      notifications: {
        email: {
          enabled: false,
        },
        hipchat: {
          enabled: false,
          botName: 'Spinnaker Bot'
        },
        sms: {
          enabled: false,
        },
        slack: {
          enabled: false,
          botName: 'spinnakerbot'
        }
      },
      whatsNew: {
        gistId: '32526cd608db3d811b38',
        fileName: 'news.md',
      },
      feature: {
        pipelines: true,
        jobs: true,
        notifications: true,
        fastProperty: false,
        vpcMigrator: false,
        clusterDiff: false,
        roscoMode: false,
        netflixMode: false,
        infrastructureStages: true, // Should 'createLoadBalancer' be a pipeline stage? (no).
      },
    };
  spinnaker.yml: |
    
    # This file is intended to serve as a master configuration for a Spinnaker
    # deployment. Customizations to the deployment should be made in another file
    # named "spinnaker-local.yml". The distribution has a prototype called
    # "default-spinnaker-local.yml" which calls out the subset of attributes of
    # general interest. It can be copied into a "spinnaker-local.yml" to start
    # with. The prototype does not change any of the default values here, it just
    # surfaces the more critical attributes.
    
    global:
      spinnaker:
        environment: test
        timezone: 'America/Los_Angeles'
    
    services:
      default:
        # These defaults can be modified to change all the spinnaker subsystems
        # (clouddriver, gate, etc) at once, but not external systems (jenkins, etc).
        # Individual systems can still be overridden using their own section entry
        # directly under 'services'.
        host: localhost
        protocol: http
    
      clouddriver:
        host: ${services.default.host}
        port: 7002
        baseUrl: ${services.default.protocol}://${services.clouddriver.host}:${services.clouddriver.port}
        aws:
          udf:
            # Controls whether UserDataProviders are used to populate user data of
            # new server groups. If false, user data is copied over from ancestor
            # server groups on both CopyLastAsgAtomicOperation and
            # ModifyAsgLaunchConfigurationOperation (only if no user data is
            # provided on the given request).
            enabled: true
    
      echo:
        enabled: true
        host: ${services.default.host}
        port: 8089
        baseUrl: ${services.default.protocol}://${services.echo.host}:${services.echo.port}
    
        cron:
          # Allow pipeline triggers to run periodically via cron expressions.
          enabled: true
          timezone: ${global.spinnaker.timezone}
    
        notifications:
          # The following blocks can enable Spinnaker to send notifications
          # using the corresponding mechanism.
          # See https://www.spinnaker.io/setup/features/notifications/
          # for more information.
          mail:
            enabled: ${services.echo.notifications.mail.enabled:false}
            host: ${services.echo.notifications.mail.host}
            from: ${services.echo.notifications.mail.fromAddress}
            username: ${services.echo.notifications.mail.username}
            password: ${services.echo.notifications.mail.password}
            port: ${services.echo.notifications.mail.port}
          hipchat:
            enabled: false
            url: # the hipchat server to connect to
            token: # the hipchat auth token
            botName: # the username of the bot
          sms:
            enabled: false
            account: # twilio account id
            token: # twilio auth token
            from: # phone number by which sms messages are sent
          slack:
            enabled: ${services.echo.notifications.slack.enabled:false}
            token: ${services.echo.notifications.slack.token}
    
      deck:
        host: ${services.default.host}
        port: 9000
        baseUrl: ${services.default.protocol}://${services.deck.host}:${services.deck.port}
        gateUrl: ${services.gate.baseUrl}
        bakeryUrl: ${services.bakery.baseUrl}
        timezone: ${global.spinnaker.timezone}
        auth:
          enabled: false
    
      fiat:
        enabled: false
        host: ${services.default.host}
        port: 7003
        baseUrl: ${services.default.protocol}://${services.fiat.host}:${services.fiat.port}
    
      front50:
        host: ${services.default.host}
        port: 8080
        baseUrl: ${services.default.protocol}://${services.front50.host}:${services.front50.port}
    
        # If using storage bucket persistence (gcs or s3), specify the bucket here
        # disable cassandra and enable the storage service below.
        storage_bucket: ${services.front50.storage_bucket}
        # (GCS Only) Location for bucket.
        bucket_location:
        bucket_root: front50
    
        cassandra:
          enabled: false
        redis:
          enabled: false
        gcs:
          enabled: ${services.front50.gcs.enabled} # Enable me
          project: ${services.front50.gcs.project}
        s3:
          enabled: ${services.front50.s3.enabled} # Or me
          endpoint: ${services.front50.s3.endpoint}
    
      gate:
        host: ${services.default.host}
        port: 8084
        baseUrl: ${services.default.protocol}://${services.gate.host}:${services.gate.port}
    
      igor:
        # If you are integrating Jenkins then you must also enable Spinnaker's
        # "igor" subsystem.
        enabled: false
        host: ${services.default.host}
        port: 8088
        baseUrl: ${services.default.protocol}://${services.igor.host}:${services.igor.port}
    
      kato:
        host: ${services.clouddriver.host}
        port: ${services.clouddriver.port}
        baseUrl: ${services.clouddriver.baseUrl}
    
      mort:
        host: ${services.clouddriver.host}
        port: ${services.clouddriver.port}
        baseUrl: ${services.clouddriver.baseUrl}
    
      orca:
        host: ${services.default.host}
        port: 8083
        baseUrl: ${services.default.protocol}://${services.orca.host}:${services.orca.port}
        timezone: ${global.spinnaker.timezone}
        enabled: true
    
      oort:
        host: ${services.clouddriver.host}
        port: ${services.clouddriver.port}
        baseUrl: ${services.clouddriver.baseUrl}
    
      rosco:
        host: ${services.default.host}
        port: 8087
        baseUrl: ${services.default.protocol}://${services.rosco.host}:${services.rosco.port}
        # You need to provide the fully-qualified path to the directory containing the packer templates.
        # They typically live in rosco's config/packer directory.
        configDir: /opt/rosco/config/packer
    
      bakery:
        host: ${services.rosco.host}
        port: ${services.rosco.port}
        baseUrl: ${services.rosco.baseUrl}
        extractBuildDetails: true
        propagateCloudProviderType: true
        allowMissingPackageInstallation: false
    
      docker:
        # This target repository is used by the bakery to publish baked docker images.
        # Do not include http://.
        enabled: ${services.docker.enabled:false}
        targetRepository: ${services.docker.targetRepository}
    
      jenkins:
        # The "name" entry is used for the display name when selecting
        # this server. You must set `enabled` to true when enabling igor.
        #
        # If you have multiple jenkins servers, you will need to list
        # them in an igor-local.yml. See jenkins.masters in config/igor.yml.
        #
        # Note that jenkins is not installed with Spinnaker so you must obtain this
        # on your own if you are interested.
        enabled: ${services.igor.enabled:false}
        defaultMaster:
          name: Jenkins
          baseUrl:   # Expected in spinnaker-local.yml
          username:  # Expected in spinnaker-local.yml
          password:  # Expected in spinnaker-local.yml
    
      redis:
        host: ${services.default.host}
        port: 6379
        connection: redis://${services.redis.host}:${services.redis.port}
    
      cassandra:
        # cassandra.enabled is no longer used
        # cassandra is enabled or disabled on a per-service basis
        # where the alternative persistence mechanism for that service
        # can be enabled.
        host: ${services.cassandra.host}
        port: ${services.cassandra.port}
        embedded: ${services.cassandra.embedded}
        cluster: ${services.cassandra.cluster}
    
    providers:
      aws:
        # For more information on configuring Amazon Web Services (aws), see
        # https://www.spinnaker.io/setup/providers/aws/
    
        enabled: false
        simpleDBEnabled: false
        defaultRegion: us-east-1
        defaultSimpleDBDomain: CLOUD_APPLICATIONS
        primaryCredentials:
          name: default
          # The actual credentials are set using a standard AWS client library mechanism
          # http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/credentials.html
          # Typically this is a $HOME/.aws/credentials file (remember, a standard
          # spinnaker installation runs as user "spinnaker" whose $HOME is
          # /home/spinnaker). The primaryCredentials.name will identify which profile
          # to use (for .aws/credentials).
    
        # {{name}} will be interpolated with the aws account name (e.g. "my-aws-account-keypair").
        defaultKeyPairTemplate: "{{name}}-keypair"
    
      google:
        # For more information on configuring Google Cloud Platform (google), see
        # https://www.spinnaker.io/setup/providers/gce/
    
        enabled: false
        defaultRegion: us-central1
        defaultZone: us-central1-f
        primaryCredentials:
          name: my-account-name
          # The project is the Google Project ID for the project to manage with
          # Spinnaker. The jsonPath is a path to the JSON service credentials
          # downloaded from the Google Developer's Console.
          project:
          jsonPath:
    
      azure:
        # For more information on configuring Microsoft Azure (azure), see
        # https://www.spinnaker.io/setup/providers/azure/
    
        enabled: false
        defaultRegion: westus
        primaryCredentials:
          name: my-azure-account
    
          # To set Azure credentials, enter your Azure subscription values for:
          # clientId, appKey, tenantId, and subscriptionId.
          clientId:
          appKey:
          tenantId:
          subscriptionId:
    
      kubernetes:
        # For more information on configuring Kubernetes clusters (kubernetes), see
        # https://www.spinnaker.io/setup/providers/kubernetes/
    
        # NOTE: enabling kubernetes also requires enabling dockerRegistry.
        enabled: ${providers.kubernetes.enabled}
        primaryCredentials:
          name: ${providers.kubernetes.primaryCredentials.name}
          namespace: ${providers.kubernetes.primaryCredentials.namespace}
          dockerRegistryAccount: ${providers.dockerRegistry.primaryCredentials.name}
    
      dockerRegistry:
        # If you want to use a container based provider, you need to configure and
        # enable this provider to cache images.
        enabled: ${providers.dockerRegistry.enabled}
        primaryCredentials:
          name: ${providers.dockerRegistry.primaryCredentials.name}
          address: ${providers.dockerRegistry.primaryCredentials.address}
          repository: ${providers.dockerRegistry.primaryCredentials.repository}
    
  clouddriver-local.yml: |
    server:
      port: ${services.clouddriver.port:7002}
      address: 0.0.0.0

    default:
      account:
        env: ${providers.kubernetes.primaryCredentials.name}

    kubernetes:
      enabled: true
      accounts:
        - name: local
          serviceAccount: true
          dockerRegistries:
            - accountName: dockerhub
    dockerRegistry:
      enabled: true
      accounts:
        - name: dockerhub
          address: https://index.docker.io
          
          repositories:
            - library/alpine
            - library/ubuntu
            - library/centos
            - library/nginx
          
    credentials:
      primaryAccountTypes: ${providers.kubernetes.primaryCredentials.name}
      challengeDestructiveActionsEnvironments: ${providers.kubernetes.primaryCredentials.name}
  spinnaker-local.yml: |
    global:
      spinnaker:
        environment: test

    services:
      default:
        # These defaults can be modified to change all the spinnaker subsystems
        # (clouddriver, gate, etc) at once, but not external systems (jenkins, etc).
        # Individual systems can still be overridden using their own section entry
        # directly under 'services'.
        host: localhost
        protocol: http

      clouddriver:
        host: RELEASE-NAME-spinnaker-clouddriver
        port: 7002
        baseUrl: ${services.default.protocol}://${services.clouddriver.host}:${services.clouddriver.port}
        # Controls whether UserDataProviders are used to populate user data of new server groups.
        # If false, user data is copied over from ancestor server groups on both CopyLastAsgAtomicOperation and
        # ModifyAsgLaunchConfigurationOperation (only if no user data is provided on the given request).
        aws:
          udf:
            enabled: false

      echo:
        enabled: true
        host: RELEASE-NAME-spinnaker-echo
        port: 8089
        baseUrl: ${services.default.protocol}://${services.echo.host}:${services.echo.port}
        cron:
          enabled: true
        notifications:
          # allow pipeline triggers to run periodically via cron expressions
          # If you wish for spinnaker to send notifications, configure the following blocks
          mail:
            enabled: false
            host: smtp.example.org
            username: admin
            password: admin
            fromAddress: spinnaker@example.org
            port: 25
          hipchat:
            enabled: false
            url: # the hipchat server to connect to
            token: #the hipchat auth token
          sms:
            enabled: false
            account: # twilio account id
            token: # twilio auth token
            from: # phone number by which sms messages are sent
          slack:
            enabled: false
            token: 

      deck:
        host: RELEASE-NAME-spinnaker-deck
        port: 9000
        baseUrl: ${services.default.protocol}://${services.deck.host}:${services.deck.port}
        gateUrl: ${services.gate.baseUrl}
        bakeryUrl: ${services.bakery.baseUrl}
        timezone: 'America/New_York'
        auth:
          enabled: false

      front50:
        host: RELEASE-NAME-spinnaker-front50
        port: 8080
        baseUrl: ${services.default.protocol}://${services.front50.host}:${services.front50.port}

        # If using storage bucket persistence (gcs or s3), specify the bucket here
        # disable cassandra and enable the storage service below.
        storage_bucket: spinnaker
        bucket_root: front50

        cassandra:
          enabled: false
        redis:
          enabled: false
        
        gcs:
          enabled: false
        s3:
          enabled: true
          endpoint: http://RELEASE-NAME-minio:9000
        
      gate:
        host: RELEASE-NAME-spinnaker-gate
        port: 8084
        baseUrl: ${services.default.protocol}://${services.gate.host}:${services.gate.port}/gate

      igor:
        # If you are integrating Jenkins then you must also enable Spinnaker's
        # "igor" subsystem.
        enabled: true
        host: RELEASE-NAME-spinnaker-igor
        port: 8088
        baseUrl: ${services.default.protocol}://${services.igor.host}:${services.igor.port}

      kato:
        host: ${services.clouddriver.host}
        port: ${services.clouddriver.port}
        baseUrl: ${services.clouddriver.baseUrl}

      mort:
        host: ${services.clouddriver.host}
        port: ${services.clouddriver.port}
        baseUrl: ${services.clouddriver.baseUrl}

      orca:
        host: RELEASE-NAME-spinnaker-orca
        port: 8083
        baseUrl: ${services.default.protocol}://${services.orca.host}:${services.orca.port}
        enabled: true

      oort:
        host: ${services.clouddriver.host}
        port: ${services.clouddriver.port}
        baseUrl: ${services.clouddriver.baseUrl}

      rosco:
        host: RELEASE-NAME-spinnaker-rosco
        port: 8087
        baseUrl: ${services.default.protocol}://${services.rosco.host}:${services.rosco.port}
        # You need to provide the fully-qualified path to the directory containing the packer templates.
        # They typically live in rosco's config/packer directory.
        configDir: /opt/rosco/config/packer

      bakery:
        host: ${services.rosco.host}
        port: ${services.rosco.port}
        baseUrl: ${services.rosco.baseUrl}
        extractBuildDetails: true

      docker:
        # This target repository is used by the bakery to publish baked docker images.
        # Do not include http://.
        enabled: true
        targetRepository: viglesiasce/sample-app

      jenkins:
        # The "name" entry is used for the display name when selecting
        # this server. You must set `enabled` to true when enabling igor.
        #
        # If you have multiple jenkins servers, you will need to list
        # them in an igor-local.yml. See jenkins.masters in config/igor.yml.
        #
        # Note that jenkins is not installed with Spinnaker so you must obtain this
        # on your own if you are interested.
        enabled: true
        defaultMaster:
          name: default
          baseUrl: http://RELEASE-NAME-jenkins:8080/
          username: admin
          password: admin

      redis:
        host: RELEASE-NAME-redis
        port: 6379
        connection: redis://:password@${services.redis.host}:${services.redis.port}

    providers:
    
      kubernetes:
        enabled: true
        primaryCredentials:
          name: local
          namespace: default
          dockerRegistryAccount: dockerhub

      dockerRegistry:
        enabled: true
        primaryCredentials:
          name: dockerhub
          address: https://index.docker.io
          repository: vic-goog/gceme
    
