<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Armory Docs – Advanced Installation and Configuration</title><link>/plugins/scale-agent/install/advanced/</link><description>Recent content in Advanced Installation and Configuration on Armory Docs</description><generator>Hugo -- gohugo.io</generator><atom:link href="/plugins/scale-agent/install/advanced/index.xml" rel="self" type="application/rss+xml"/><item><title>Plugins: Armory Scale Agent Service Deployment Modes</title><link>/plugins/scale-agent/install/advanced/modes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/plugins/scale-agent/install/advanced/modes/</guid><description>
&lt;h2 id="deployment-modes">Deployment modes&lt;/h2>
&lt;h3 id="spinnaker-service-mode">Spinnaker Service mode&lt;/h3>
&lt;p>In this mode, you install the Armory Scale Agent service as a new Spinnaker service (&lt;code>spin-armory-agent&lt;/code>), so you can configure it like other services.&lt;/p>
&lt;figure>
&lt;img src="/images/scale-agent/in-cluster-mode.png"/>
&lt;/figure>
&lt;p>If you provision clusters automatically, the Armory Scale Agent service can dynamically reload accounts when &lt;code>armory-agent.yaml&lt;/code> changes. You could, for example, configure accounts in a &lt;code>ConfigMap&lt;/code> mounting to &lt;code>/opt/armory/config/armory-agent-local.yaml&lt;/code>. The Agent service reflects &lt;code>ConfigMap&lt;/code> changes within seconds after &lt;a href="https://etcd.io/">etcd&lt;/a> sync.&lt;/p>
&lt;p>&lt;strong>Pros&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>You do not have to configure external Network/Application Load Balancers to expose the Clouddriver gRPC port unless you want to use the Dynamic Accounts REST API.&lt;/li>
&lt;li>The Agent service can be managed centrally, so it is easy to get logs or configs and upgrade.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Cons&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>You need to create kubeconfig file for each Kubernetes account.&lt;/li>
&lt;li>The API servers of the target clusters need to be accessible from the Armory CD (Spinnaker) cluster.&lt;/li>
&lt;/ul>
&lt;h3 id="infrastructure-mode">Infrastructure mode&lt;/h3>
&lt;p>In infrastructure mode, multiple Agent service deployments handle different groups of Kubernetes clusters. Each service deployment is configured separately.&lt;/p>
&lt;p>Keep the following pros and cons in mind when deciding if Infrastructure mode fits your use case:&lt;/p>
&lt;p>&lt;strong>Pro&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>The Agent service can be managed centrally, so it is easy to get logs or configs and upgrade.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Cons&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>You need to create a kubeconfig file for each Kubernetes account.&lt;/li>
&lt;li>The API servers of the target clusters need to be accessible from the Armory Scale Agent cluster.&lt;/li>
&lt;li>You need to expose gRPC port for Clouddriver through an external load balancer capable of handling HTTP/2 for gRPC communication.&lt;/li>
&lt;/ul>
&lt;figure>
&lt;img src="/images/scale-agent/agent-infra-mode.png"/>
&lt;/figure>
&lt;blockquote>
&lt;p>Kubernetes account names must be unique across all your infrastructure. Clouddriver rejects new accounts with a name that matches a different cluster.&lt;/p>
&lt;/blockquote>
&lt;h3 id="agent-mode">Agent mode&lt;/h3>
&lt;p>In this mode, the Armory Scale Agent service acts as a piece of infrastructure. It authenticates using a &lt;a href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens">service account token&lt;/a>. You use
&lt;a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#service-account-permissions">RBAC service account permissions&lt;/a> to configure what the Armory Scale Agent service is authorized to do.&lt;/p>
&lt;p>If the Clouddriver plugin is unable to communicate with the Scale Agent service, the plugin attempts to reconnect during a defined grace period. If the plugin still can&amp;rsquo;t communicate with the Scale Agent service after the grace period has expired, the plugin removes the cluster associated with that Scale Agent service from Armory CD.&lt;/p>
&lt;p>In this mode, Armory CD never gets credentials, and Kubernetes account registration is dynamic.&lt;/p>
&lt;p>Keep the following pros and cons in mind when deciding if Agent mode fits your use case:&lt;/p>
&lt;p>&lt;strong>Pros&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Agent mode is scalable because each agent only manages one Kubernetes account.&lt;/li>
&lt;li>Initial setup is easier because there&amp;rsquo;s no need to create kubeconfig files.&lt;/li>
&lt;li>Target clusters can remain private or in separate VPCs from the Armory CD (Spinnaker) cluster because Scale Agents initiate the connection to Armory CD (Spinnaker).&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Cons&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>It is difficult to get agent logs, upgrade the Agent service, or check configurations because agents (often) run in third-party clusters that the DevOps team operating Armory CD (Spinnaker) doesn&amp;rsquo;t have access.&lt;/li>
&lt;li>There is no authentication/authorization, so any team can start an Agent and register itself with Armory CD (Spinnaker). mTLS encryption can be used so that only agents with the right certificate can register. For information about how to configure mTLS, see &lt;a href="/plugins/scale-agent/tasks/configure-mtls/"}>Configure Mutual TLS Authentication&lt;/a>.&lt;/li>
&lt;li>You need to expose gRPC port for Clouddriver through an external load balancer capable of handling HTTP/2 for gRPC communication.&lt;/li>
&lt;/ul>
&lt;figure>
&lt;img src="/images/scale-agent/agent-mode.png"/>
&lt;/figure>
&lt;h2 id="scalability">Scalability&lt;/h2>
&lt;p>Each Agent can scale to hundreds of Kubernetes clusters. The more types of Kubernetes objects the Armory Scale Agent has to watch, the more memory it uses. Memory usage is bursty. You can control burst with &lt;code>budget&lt;/code>. See &lt;a href="/plugins/scale-agent/reference/config/service-options/#configuration-options">Agent options&lt;/a> for configuration information.&lt;/p>
&lt;p>Scaling the Armory Scale Agent can mean:&lt;/p>
&lt;ul>
&lt;li>Scaling the Kubernetes &lt;code>Deployment&lt;/code> the Armory Scale Agent service is part of.&lt;/li>
&lt;li>Sharding Kubernetes clusters into groups that can in turn be scaled as described in &lt;a href="#infrastructure-mode">Infrastructure mode&lt;/a> above.&lt;/li>
&lt;/ul>
&lt;p>You can also mix deployment strategies if you have complex Kubernetes infrastructure and permissions:&lt;/p>
&lt;ul>
&lt;li>Run as a Spinnaker service&lt;/li>
&lt;li>Run in target clusters&lt;/li>
&lt;li>Run next to traditional Spinnaker Kubernetes accounts&lt;/li>
&lt;/ul></description></item><item><title>Plugins: Armory Scale Agent Service Deployment Methods</title><link>/plugins/scale-agent/install/advanced/service-deploy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/plugins/scale-agent/install/advanced/service-deploy/</guid><description/></item><item><title>Plugins: Armory Scale Agent Service Configuration</title><link>/plugins/scale-agent/install/advanced/config-service/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/plugins/scale-agent/install/advanced/config-service/</guid><description>
&lt;h2 id="where-to-configure-the-armory-scale-agent">Where to configure the Armory Scale Agent&lt;/h2>
&lt;ul>
&lt;li>If you install the Armory Scale Agent service using &lt;code>kubectl&lt;/code>, configure the Armory Scale Agent using a &lt;code>ConfigMap&lt;/code>. See the &lt;code>kubectl&lt;/code> installation instruction&amp;rsquo;s &lt;a href="/plugins/scale-agent/install/install-spin/#configure-the-service">Configure the service&lt;/a> section for an example.&lt;/li>
&lt;li>See &lt;a href="/plugins/scale-agent/install/advanced/service-deploy/helm/"}>Deploy the Armory Scale Agent Service Using a Helm Chart&lt;/a> for both CLI and &lt;code>values.yml&lt;/code> configuration options.&lt;/li>
&lt;/ul>
&lt;h2 id="configure-kubernetes-accounts">Configure Kubernetes accounts&lt;/h2>
&lt;p>You can configure Kubernetes accounts in Spinnaker in multiple places:&lt;/p>
&lt;ul>
&lt;li>Clouddriver configuration files: &lt;code>clouddriver.yml&lt;/code>, &lt;code>clouddriver-local.yml&lt;/code>, &lt;code>spinnaker.yml&lt;/code>, &lt;code>spinnaker-local.yml&lt;/code>&lt;/li>
&lt;li>Spring Cloud Config Server reading accounts from Git, Vault, or another supported backend&lt;/li>
&lt;li>Plugins&lt;/li>
&lt;/ul>
&lt;p>Behavior when reading Kubernetes account configuration from multiple sources:&lt;/p>
&lt;ul>
&lt;li>When you configure different accounts in Agent and Armory CD, Agent merges both sources.&lt;/li>
&lt;li>If you configure an account with the same name in Agent as well as Armory CD (Clouddriver or Spring Cloud Config Server backends), Agent account configuration always overrides the Armory CD configuration.&lt;/li>
&lt;li>If you configure an account with the same name in Agent as well as in the Clouddriver plugin, the account that is used depends on the order of precedence defined in the plugin&amp;rsquo;s &lt;code>CredentialsDefinitionSource&lt;/code> interface. The Agent has an order precedence of 1000. Check with your plugin provider for the plugin&amp;rsquo;s order of precedence.
&lt;ul>
&lt;li>If the plugin has a higher precedence than the Armory Scale Agent, the plugin&amp;rsquo;s account is used. For example, if the plugin&amp;rsquo;s precedence is 500, the plugin&amp;rsquo;s account is used.&lt;/li>
&lt;li>If the plugin has no precedence defined or a lower precedence than the Armory Scale Agent, the account defined in the Armory Scale Agent is used.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="migrate-accounts-from-clouddriver-to-agent">Migrate accounts from Clouddriver to Agent&lt;/h3>
&lt;p>Copy the account definition from its original source, such as Clouddriver, to Agent&amp;rsquo;s configuration. Depending on how you installed Agent, this configuration could be in the &lt;code>armory-agent.yml&lt;/code> data section of a &lt;code>ConfigMap&lt;/code> or in the &lt;code>armory-agent.yml&lt;/code> file in the Armory Scale Agent pod.&lt;/p>
&lt;p>Agent may not use all the properties you copy from the original source definition. Unused properties are ignored.&lt;/p>
&lt;h4 id="agent-mode">Agent mode&lt;/h4>
&lt;p>In Agent mode, your configuration should look similar to this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kubernetes&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">accounts&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">name&lt;/span>: account-01
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">serviceAccount&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="spinnaker-service-and-infrastructure-modes">Spinnaker Service and Infrastructure modes&lt;/h4>
&lt;p>You set up multiple accounts per Agent in these modes. Your configuration should look similar to this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kubernetes&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">accounts&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">name&lt;/span>: account-name-01
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">kubeconfigFile&lt;/span>: /kubeconfigfiles/kubecfg-account01.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">name&lt;/span>: account-name-02
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">kubeconfigFile&lt;/span>: /kubeconfigfiles/kubecfg-account02.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - ...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="automatically-migrate-accounts-from-clouddriver-to-agent">Automatically migrate accounts from Clouddriver to Agent&lt;/h3>
&lt;p>The Dynamic Accounts feature enables manual account migration using a REST API or automatic account migration via request interception or a scanning mechanism. See &lt;a href="/plugins/scale-agent/concepts/dynamic-accounts/"}>Dynamic Accounts Architecture and Features&lt;/a>.&lt;/p>
&lt;h3 id="migrate-accounts-from-agent-to-clouddriver">Migrate accounts from Agent to Clouddriver&lt;/h3>
&lt;p>Follow these steps to migrate accounts from Agent to Clouddriver:&lt;/p>
&lt;ul>
&lt;li>Delete the account definition from your Agent configuration. Depending on how you installed Agent, this configuration could be in the &lt;code>armory-agent.yml&lt;/code> data section of a &lt;code>ConfigMap&lt;/code> or in the &lt;code>armory-agent.yml&lt;/code> file in the Armory Scale Agent pod.&lt;/li>
&lt;li>Add the account definition to the source that Clouddriver uses.&lt;/li>
&lt;/ul>
&lt;h2 id="permissions-format">Permissions format&lt;/h2>
&lt;p>Permissions for the Armory Scale Agent use a format that is slightly different than the format that Clouddriver uses for permissions. Define your permissions like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>kubernetes:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> accounts:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - name: my-k8s-account
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> permissions:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - READ: [&amp;#39;role1&amp;#39;, &amp;#39;role2&amp;#39;]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - WRITE: [&amp;#39;role3&amp;#39;, &amp;#39;role4&amp;#39;]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;blockquote>
&lt;p>Make sure that there are no whitespaces in the role configurations under the &lt;code>READ&lt;/code> or &lt;code>WRITE&lt;/code> tags. The permissions are not applied if there are whitespaces in the configuration. This means that all users will have access to the account.&lt;/p>
&lt;/blockquote>
&lt;h2 id="restricted-environments">Restricted environments&lt;/h2>
&lt;h3 id="network-access">Network access&lt;/h3>
&lt;p>The Agent needs access to its control plane (Spinnaker) as well to the various Kubernetes clusters it is configured to monitor. You can control which traffic should go through an HTTP proxy via the usual &lt;code>HTTP_PROXY&lt;/code>, &lt;code>HTTPS_PROXY&lt;/code>, and &lt;code>NO_PROXY&lt;/code> environment variables.&lt;/p>
&lt;p>A common case is to force the connection back to the control plane via a proxy but bypass it for Kubernetes clusters. In that case, define the environment variable &lt;code>HTTPS_PROXY=https://my.corporate.proxy&lt;/code> and use the &lt;code>kubernetes.noProxy: true&lt;/code> setting to not have to maintain the list of Kubernetes hosts in &lt;code>NO_PROXY&lt;/code>.&lt;/p>
&lt;h3 id="kubernetes-authorization">Kubernetes authorization&lt;/h3>
&lt;p>The Agent should be configured to access each Kubernetes cluster it monitors with a service account. You can limit what Spinnaker can do via the role you assign to that service account. For example, if you&amp;rsquo;d like Spinnaker to see &lt;code>NetworkPolicies&lt;/code> but not deploy them:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">apiVersion&lt;/span>: rbac.authorization.k8s.io/v1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kind&lt;/span>: ClusterRole
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">metadata&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">name&lt;/span>: agent-role
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">rules&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>- &lt;span style="color:#ff79c6">apiGroups&lt;/span>: [&lt;span style="color:#f1fa8c">&amp;#34;networking.k8s.io&amp;#34;&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">resources&lt;/span>: [&lt;span style="color:#f1fa8c">&amp;#34;networkpolicies&amp;#34;&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">verbs&lt;/span>: [ &lt;span style="color:#f1fa8c">&amp;#34;get&amp;#34;&lt;/span>, &lt;span style="color:#f1fa8c">&amp;#34;list&amp;#34;&lt;/span>, &lt;span style="color:#f1fa8c">&amp;#34;watch&amp;#34;&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="namespace-restrictions">Namespace restrictions&lt;/h3>
&lt;p>You can limit the Armory Scale Agent to monitoring specific namespaces by listing them under &lt;code>namespaces&lt;/code>. If you need to prevent the Armory Scale Agent from accessing cluster-wide (non-namespaced) resources, use the &lt;code>onlyNamespacedResources&lt;/code> setting.&lt;/p>
&lt;p>A side effect of disabling cluster-wide resources is that &lt;a href="https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/">CustomResourceDefinitions&lt;/a> won&amp;rsquo;t be known (and therefore deployable by Spinnaker). &lt;code>CustomResourceDefinitions&lt;/code> are cluster-wide resources, but the custom resources themselves may be namespaced. To workaround the limitation, you can define &lt;code>customResourceDefinitions&lt;/code>. Both namespaces and CRDs are sent to Spinnaker as &amp;ldquo;synthetic&amp;rdquo; resources. They won&amp;rsquo;t be queried or watched, but Spinnaker knows about their existence.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kubernetes&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">accounts&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">name&lt;/span>: production
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#6272a4"># Restricts the agent to namespaces `ns1` and `ns2`&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">namespaces&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - ns1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - ns2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#6272a4"># Prevents the Armory Scale Agent from querying non-namespaced resources&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">onlyNamespacedResources&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#6272a4"># Whitelist CRDs so Spinnaker&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">customResourceDefinitions&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">kind&lt;/span>: ServiceMonitor.monitoring.coreos.com
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">kind&lt;/span>: SpinnakerService.spinnaker.armory.io
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="whats-next">What&amp;rsquo;s next&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="/plugins/scale-agent/reference/config/service-options/"}>Armory Scale Agent Service Configuration Options&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Plugins: Install the Scale Agent Plugin Using a Docker Image</title><link>/plugins/scale-agent/install/advanced/plugin-docker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/plugins/scale-agent/install/advanced/plugin-docker/</guid><description>
&lt;h2 id="halyard-local-config">Halyard local config&lt;/h2>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Warning&lt;/h4>
The Scale Agent plugin extends Clouddriver. When Halyard adds a plugin to a Spinnaker installation, it adds the plugin repository information to each service. This means that when you restart Spinnaker, each service restarts, downloads the plugin, and checks if an extension exists for that service. Each service restarting is not ideal for large Spinnaker installations due to service restart times. To avoid each service restarting and downloading the plugin, configure the plugin in Clouddriver’s local profile.
&lt;/div>
&lt;ol>
&lt;li>
&lt;p>Create a &lt;a href="https://spinnaker.io/docs/reference/halyard/custom/">custom service setting&lt;/a> that mounts an empty volume inside Clouddriver for the plugin image. Add the following to your &lt;code>.hal/default/service-settings/clouddriver.yml&lt;/code> file:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kubernetes&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">volumes&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">id&lt;/span>: kubesvc-plugin-vol
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">type&lt;/span>: emptyDir
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">mountPath&lt;/span>: /opt/clouddriver/lib/plugins
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Define an init container for the plugin. In the &lt;code>deploymentConfigurations.name.deploymentEnvironment.initContainers&lt;/code> section of your &lt;code>.hal/config&lt;/code>, add the following:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">spin-cloudriver&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>- &lt;span style="color:#ff79c6">name&lt;/span>: kubesvc-plugin
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">image&lt;/span>: docker.io/armory/kubesvc-plugin:&amp;lt;version&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">volumeMounts&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">mountPath&lt;/span>: /opt/plugin/target
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">name&lt;/span>: kubesvc-plugin-vol
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Be sure to use the plugin version compatible with your Spinnaker version.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add the plugin to your &lt;code>clouddriver-local.yml&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">spinnaker&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">extensibility&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">plugins&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">Armory.Kubesvc&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">enabled&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">extensions&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">armory.kubesvc&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">enabled&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">pluginsRootPath&lt;/span>: /opt/clouddriver/lib/plugins
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kubesvc&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">cluster&lt;/span>: kubernetes
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kubernetes&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">enabled&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#6272a4"># enable Clouddriver Account Management if you are using Spinnaker 1.28+&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">account&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">storage&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">enabled&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Apply your changes by running &lt;code>hal deploy apply&lt;/code>.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h3 id="validate-plugin-installation">Validate plugin installation&lt;/h3>
&lt;ol>
&lt;li>
&lt;p>Confirm the plugin Docker image exists locally.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>docker images | grep kubesvc
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Output is similar to:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>armory/kubesvc-plugin 0.11.32
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Find the name of the new Clouddriver pod.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>kubectl -n spinnaker get pods
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Confirm the Clouddriver service is using the Docker image.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>kubectl -n spinnaker describe pod &amp;lt;clouddriver-pod-name&amp;gt; | grep Image:
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Output is similar to:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>Image: docker.io/armory/kubesvc-plugin:0.11.32
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>View the Clouddriver log to verify that the plugin has started.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>kubectl -n spinnaker logs deployments/spin-clouddriver | grep &lt;span style="color:#f1fa8c">&amp;#34;Plugin&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Output is similar to:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>org.pf4j.AbstractPluginManager : Plugin &lt;span style="color:#f1fa8c">&amp;#39;Armory.Kubesvc@0.11.32&amp;#39;&lt;/span> resolved
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>org.pf4j.AbstractPluginManager : Start plugin &lt;span style="color:#f1fa8c">&amp;#39;Armory.Kubesvc@0.11.32&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>io.armory.kubesvc.KubesvcPlugin : Starting Kubesvc plugin...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="armory-operator-or-spinnaker-operator">Armory Operator or Spinnaker Operator&lt;/h2>
&lt;p>You can find the Kustomize file &lt;code>plugin-container-patch.yml&lt;/code> in the &lt;code>spinnaker-patches-kustomize&lt;/code> &lt;a href="https://github.com/armory/spinnaker-kustomize-patches/tree/master/targets/kubernetes/scale-agent">repo&lt;/a>.&lt;/p>
&lt;p>Change the value for &lt;code>metadata.name&lt;/code> if your Armory CD service is called something other than “spinnaker”.&lt;/p>
&lt;p>Then include the file under the &lt;code>patchesStrategicMerge&lt;/code> section of your kustomization file.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">patchesStrategicMerge&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &amp;lt;path&amp;gt;/plugin-container-patch.yml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Apply your changes.&lt;/p></description></item></channel></rss>