-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For compositions where we use functions, they had to be re-structured, as in such cases the P+T part is just treated as another function. For all non-function compositions no changes are necessary.
- Loading branch information
Showing
84 changed files
with
4,402 additions
and
4,492 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
local common = import 'common.libsonnet'; | ||
local com = import 'lib/commodore.libjsonnet'; | ||
local kap = import 'lib/kapitan.libjsonnet'; | ||
local kube = import 'lib/kube.libjsonnet'; | ||
|
||
local crossplane = import 'lib/crossplane.libsonnet'; | ||
|
||
local inv = kap.inventory(); | ||
local params = inv.parameters.appcat; | ||
local appcatImage = params.images.functionAppcat; | ||
local pntImage = params.images.functionpnt; | ||
|
||
local getFunction(name, package) = { | ||
apiVersion: 'pkg.crossplane.io/v1beta1', | ||
kind: 'Function', | ||
metadata: { | ||
name: name, | ||
}, | ||
spec: { | ||
package: package, | ||
}, | ||
}; | ||
|
||
local appcatRuntimeConfig = { | ||
apiVersion: 'pkg.crossplane.io/v1beta1', | ||
kind: 'DeploymentRuntimeConfig', | ||
metadata: { | ||
name: 'appcat-runtime-config', | ||
}, | ||
spec: { | ||
deploymentTemplate: { | ||
spec: { | ||
selector: {}, | ||
template: { | ||
spec: | ||
{ | ||
containers: [ | ||
{ | ||
name: 'package-runtime', | ||
command: [ 'appcat' ], | ||
args: [ 'functions' ], | ||
securityContext: {}, | ||
}, | ||
], | ||
securityContext: {}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
local defaultRuntimeConfig = { | ||
apiVersion: 'pkg.crossplane.io/v1beta1', | ||
kind: 'DeploymentRuntimeConfig', | ||
metadata: { | ||
name: 'default', | ||
}, | ||
spec: { | ||
deploymentTemplate: { | ||
spec: { | ||
selector: {}, | ||
template: { | ||
spec: | ||
{ | ||
containers: [ | ||
{ | ||
name: 'package-runtime', | ||
securityContext: {}, | ||
}, | ||
], | ||
securityContext: {}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
|
||
local appcatImageTag = std.strReplace(appcatImage.tag, '/', '_'); | ||
|
||
local appcatFunctionImage = appcatImage.registry + '/' + appcatImage.repository + ':' + appcatImageTag; | ||
|
||
local appcat = getFunction('function-appcat', appcatFunctionImage) + { | ||
spec+: { | ||
runtimeConfigRef: { | ||
name: 'appcat-runtime-config', | ||
}, | ||
}, | ||
}; | ||
|
||
local pntFunctionImage = pntImage.registry + '/' + pntImage.repository + ':' + pntImage.tag; | ||
|
||
{ | ||
'10_function_patch_and_transform': getFunction('function-patch-and-transform', pntFunctionImage), | ||
'10_function_appcat': appcat, | ||
'10_runtimeconfig_appcat': appcatRuntimeConfig, | ||
'10_runtimeconfig_default': defaultRuntimeConfig, | ||
} |
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
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
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
Oops, something went wrong.