Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ytt templates refactoring and upgrading to v0.1.0 (#4)
* feat(ytt): initial values * fix(chart): add function to imports * feat(ytt): added crds * fix(ytt): fixed loglevel "default" logic * fix(ytt): added "v" to image tag parser * feat(ytt): added monitoring sa * fix(ytt): modified webhook strategy * feat(ytt): sync with v0.1.0 1035afc Co-authored-by: alegrey91 <ale_grey_91@hotmail.it>
- Loading branch information
Showing
19 changed files
with
1,389 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# do not track temporary files | ||
*.tmp | ||
*.bak | ||
*.swp |
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,56 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.5.0 | ||
creationTimestamp: null | ||
name: capsuleconfigurations.capsule.clastix.io | ||
spec: | ||
group: capsule.clastix.io | ||
names: | ||
kind: CapsuleConfiguration | ||
listKind: CapsuleConfigurationList | ||
plural: capsuleconfigurations | ||
singular: capsuleconfiguration | ||
scope: Cluster | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: CapsuleConfiguration is the Schema for the Capsule configuration API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: CapsuleConfigurationSpec defines the Capsule configuration | ||
properties: | ||
forceTenantPrefix: | ||
default: false | ||
description: Enforces the Tenant owner, during Namespace creation, to name it using the selected Tenant name as prefix, separated by a dash. This is useful to avoid Namespace name collision in a public CaaS environment. | ||
type: boolean | ||
protectedNamespaceRegex: | ||
description: Disallow creation of namespaces, whose name matches this regexp | ||
type: string | ||
userGroups: | ||
default: | ||
- capsule.clastix.io | ||
description: Names of the groups for Capsule users. | ||
items: | ||
type: string | ||
type: array | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
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,26 @@ | ||
#@ load("@ytt:data", "data") | ||
#@ load("config.lib.yml", "secretTlsName", "secretCaName", "fullName") | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: #@ fullName() + "-kapp-config" | ||
labels: | ||
kapp.k14s.io/config: "" | ||
data: | ||
config.yml: | | ||
apiVersion: kapp.k14s.io/v1alpha1 | ||
kind: Config | ||
rebaseRules: | ||
- path: [data] | ||
type: copy | ||
sources: [existing, new] | ||
resourceMatchers: | ||
- kindNamespaceNameMatcher: | ||
kind: Secret | ||
namespace: #@ data.values.release.namespace | ||
name: #@ secretTlsName() | ||
- kindNamespaceNameMatcher: | ||
kind: Secret | ||
namespace: #@ data.values.release.namespace | ||
name: #@ secretCaName() |
6 changes: 4 additions & 2 deletions
6
templates/configuration-default.yaml → configuration-default.yaml
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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
#@ load("@ytt:data", "data") | ||
#@ load("config.lib.yml", "labels") | ||
|
||
apiVersion: capsule.clastix.io/v1alpha1 | ||
kind: CapsuleConfiguration | ||
metadata: | ||
name: default | ||
labels: #@ labels() | ||
spec: | ||
forceTenantPrefix: #@ data.values.manager.options.forceTenantPrefix | ||
userGroups: | ||
#@ for/end item in data.values.manager.options.capsuleUserGroups: | ||
- #@ item | ||
protectedNamespaceRegex: #@ data.values.manager.options.protectedNamespaceRegex | ||
allowTenantIngressHostnamesCollision: #@ data.values.manager.options.allowTenantIngressHostnamesCollision | ||
allowIngressHostnameCollision: #@ data.values.manager.options.allowIngressHostnameCollision | ||
#!allowTenantIngressHostnamesCollision: #@ data.values.manager.options.allowTenantIngressHostnamesCollision | ||
#!allowIngressHostnameCollision: #@ data.values.manager.options.allowIngressHostnameCollision |
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
#@ load("@ytt:data", "data") | ||
#@ load("config.lib.yml", "name", "fullName", "chart", "labels", "selectorLabels") | ||
#@ load("config.lib.yml", "name", "fullName", "chart", "labels", "selectorLabels", "serviceAccountName") | ||
|
||
#@ if data.values.serviceAccount.create: | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: #@ serviceAccountName() | ||
labels: #@ labels() | ||
annotations: | ||
#@ if data.values.annotations: | ||
#@ return data.values.serviceMonitor.labels | ||
#@ if data.values.serviceAccount.annotations: | ||
annotations: #@ data.values.serviceAccount.annotations | ||
#@ end | ||
#@ end |
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.