-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
templatize ev2 gap #825
Merged
Merged
templatize ev2 gap #825
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
geoberle
force-pushed
the
tooling-func
branch
3 times, most recently
from
November 13, 2024 13:00
681103d
to
b893faf
Compare
Please rebase pull request. |
geoberle
force-pushed
the
tooling-func
branch
2 times, most recently
from
November 13, 2024 13:06
1aae156
to
ece7e38
Compare
geoberle
force-pushed
the
tooling-func
branch
from
November 13, 2024 13:09
ece7e38
to
e252da9
Compare
Please rebase pull request. |
geoberle
force-pushed
the
tooling-func
branch
from
November 13, 2024 20:50
e252da9
to
acb30ce
Compare
geoberle
force-pushed
the
tooling-func
branch
from
November 14, 2024 10:52
2029e10
to
00ab1d6
Compare
geoberle
force-pushed
the
tooling-func
branch
3 times, most recently
from
November 14, 2024 13:13
a6a0fdd
to
978f363
Compare
Signed-off-by: Gerd Oberlechner <goberlec@redhat.com>
geoberle
force-pushed
the
tooling-func
branch
from
November 14, 2024 13:14
978f363
to
f262ef5
Compare
Signed-off-by: Gerd Oberlechner <goberlec@redhat.com>
Signed-off-by: Gerd Oberlechner <goberlec@redhat.com>
geoberle
requested review from
bennerv,
janboll,
weinong,
whober0521,
tony-schndr,
jharrington22,
SudoBrendan,
UlrichSchlueter and
zgalor
as code owners
November 14, 2024 18:22
tony-schndr
approved these changes
Nov 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
This PR tries to close the gap between
templatize
current haviour and EV2s mode of operations.Name generation
This PR removes the name generator functions e.g.
azureKeyVaultName
since for EV2 the real names need to be determined at runtime not at buildtime. so we restrict ourselves to only usectx.region
ctx.regionShort
andctx.stamp
this sadly has the impact that certain names for resources will change and that means it is disruptive for DEVs and our permantent DEV envs. after merging this, ENVs need to be recreated.
Generate with EV2 placeholders
generate an output file and replaces all placeholders with EV2 double-underscore ones when
--ev2-placeholders
is specified. this supports delayed evaluation of variables to distinguish between the EV2 build and run stage. this also means that the naming functions likeazureKeyVaultName
have been removed. Insteadregion-short
has been introduced to have a short region name (as defined by EV2) available for resource naming that will not exceed lenght limitations.EV2 ServiceConfig helper
in order to support the generation of a ServiceConfig.json, the
pkg.ev2.GetNonRegionalServiceConfigVariables
function can be used to fetch the variables from config.yaml that should go into a service configs global section. all variable values are formatted in a way to support EV2 system variables, e.g.$location(), $stamp(), $(someOtherConfigValue)
the
pkg.ev2.GetNonRegionalServiceConfigVariables
function can be used to fetch the regional overrides for a deploy env, again formatted for EV2 system variable usage.EV2 ScopeBinding helper
the
pkg.ev2.ScopeBindingVariables
function can be used to extract a find/replace suitable variable list for an EV2 ScopeBinding. the result is a dictionary with entries like__VAR__ = $config(var)
or__PARENT_CHILD__ = $config(parent.child)
for nested configs.EV2 file preprocess helper
the
pkg.ev2.PreprocessFileForEV2
function can be used to process a file with {{}} placeholders into one that uses EV2 system variables like $location() etc.Pipeline.yaml runner
the EV2 generator from the ADO repository will use a pipeline.yaml file to generate EV2 artifacts (see example in this PR).
it is important that we use this pipeline.yaml declaration also in DEV to drive deployments. this way such declarations remain well maintained.
Right now, only
Shell
runner is supported. the idea is to revamp the Makefiles so they don't require theconfig.tmpl.mk
files anymore but rely exclusively on ENV variables to be injected as defined in the pipeline.yaml. in DEV, the run-pipeline command will ensure these env vars are set. in higher envs, EV2 will take care of it.depending on the subscription and RG, the run-pipeline command will provide a suitable kubeconfig. in higher envs EV2 will take care of this.
Jira: https://issues.redhat.com/browse/ARO-12087
Link to demo recording:
Special notes for your reviewer