[Airship-discuss] [SIG-YAML] Draft substitution spec

MCEUEN, MATT MM9745 at att.com
Fri Feb 21 23:12:54 UTC 2020


Good find, Alan – that implements most of the spec, in ~200 LoC.  There are some gaps/considerations around it, which I documented at the end of the spec.

Here’s what the inputs/outputs of (most of) the spec’s example looks like in a Replacement Transformer world:
https://github.com/mattmceuen/replacement-transformer-example

Have a good weekend, all.
Matt

From: MEADOWS, ALAN <am240k at att.com>
Sent: Thursday, February 20, 2020 5:59 PM
To: MCEUEN, MATT <MM9745 at att.com>; airship-discuss at lists.airshipit.org
Subject: Re: [Airship-discuss] [SIG-YAML] Draft substitution spec

I have made a few comments in the document.

Most notably, have we examined the Kustomize ReplacementTransformer plugin?  One of the examples in the pull request:

https://github.com/kubernetes-sigs/kustomize/pull/1631


Namely, substitute the whole containers.
replacements:
  - from:
      objref:
        kind: Deployment
        name: deploy
      fieldref: spec.template.spec.containers
    to:
      target:
        kind: Deployment
        name: deploy2
      fieldrefs:
      - spec.template.spec.containers

Seems to align quite well to our need to support pulling in trees.

There appears to be some diamond import handling as well:

https://github.com/kubernetes-sigs/kustomize/pull/1631/commits/3e4354dfb85324138a9a7d5216f09cea828b40d2

Alan Meadows

From: MATT MCEUEN <MM9745 at att.com<mailto:MM9745 at att.com>>
Date: Thursday, February 20, 2020 at 2:34 PM
To: "airship-discuss at lists.airshipit.org<mailto:airship-discuss at lists.airshipit.org>" <airship-discuss at lists.airshipit.org<mailto:airship-discuss at lists.airshipit.org>>
Subject: [Airship-discuss] [SIG-YAML] Draft substitution spec

***Security Advisory: This Message Originated Outside of AT&T ***
Reference http://cso.att.com/EmailSecurity/IDSP.html for more information.

Airship SIG-YAML team,

As discussed in Monday’s call:  although Kustomize supports great layering capabilities that fit Airship’s need for overriding YAML values at for different use cases, operators, and sites, it does not offer a clean approach to achieve variable resolution / substitution that we need to avoid copying and pasting of values that should be shared across multiple resources (e.g. images, endpoints, certificates).  We decided to continue using Kustomize for layering, and to explore alternatives for substitution.

I’ve put up a draft spec we can use as a strawman, to see whether it fits the bill and whether any alternatives would be preferable.  We’ll discuss this coming Monday, but feedback in the doc would be welcome if you get time before then!
https://docs.google.com/document/d/1Z_DzbKZLjT-etddOVwQDEH7Yi9QyLIQw572Nx4ugmZk/edit#<https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.google.com_document_d_1Z-5FDzbKZLjT-2DetddOVwQDEH7Yi9QyLIQw572Nx4ugmZk_edit-23&d=DwMFAg&c=LFYZ-o9_HUMeMTSQicvjIg&r=OI-s0Rr_BtNj0OcKWGZyuA&m=YtXChvXEmJfrHaeEb98TnPBUmrFdY5wj4fR3ne8P1Ag&s=hnMKhAmCJDn_Hzr6hP1LPpwg3AphkqKDQE78qpbyDBk&e=>

Thanks,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.airshipit.org/pipermail/airship-discuss/attachments/20200221/7bc24a84/attachment.html>


More information about the Airship-discuss mailing list