Skip to content

Commit

Permalink
Add scdf
Browse files Browse the repository at this point in the history
  • Loading branch information
mhoshi-vm committed Oct 29, 2024
1 parent 12bb464 commit 5738963
Show file tree
Hide file tree
Showing 7 changed files with 540 additions and 0 deletions.
29 changes: 29 additions & 0 deletions manifests/scdf.tanzu.japan.com/2.11.5/base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: v1
kind: Namespace
metadata:
name: scdf
labels:
pod-security.kubernetes.io/enforce: baseline
---
apiVersion: v1
kind: Secret
metadata:
name: scdf-registry
namespace: scdf
annotations:
secretgen.carvel.dev/image-pull-secret: ""
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: e30K
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: default
namespace: scdf
annotations:
kapp.k14s.io/create-strategy: fallback-on-update
secrets:
- name: scdf-registry
imagePullSecrets:
- name: scdf-registry
61 changes: 61 additions & 0 deletions manifests/scdf.tanzu.japan.com/2.11.5/certmanager/certmanager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:base64", "base64")
#@ load("@ytt:yaml", "yaml")

#@ if data.values.certmanager.enabled:
apiVersion: v1
kind: Namespace
metadata:
name: certmanager-install
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kapp-sa
namespace: certmanager-install
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: certmanager-kapp-role-binding
namespace: certmanager-install
subjects:
- kind: ServiceAccount
name: kapp-sa
namespace: certmanager-install
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
#@ if data.values.certmanager.package_repo.install:
---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageRepository
metadata:
name: tds-pack
namespace: certmanager-install
annotations:
kapp.k14s.io/change-group: "pkgr"
spec:
fetch:
imgpkgBundle:
image: #@ data.values.certmanager.package_repo.repo + ":" + data.values.certmanager.package_repo.version
#@ end
#@ if data.values.certmanager.package.install:
---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageInstall
metadata:
name: cert-manager
namespace: certmanager-install
annotations:
kapp.k14s.io/change-group: "pkg-cert"
spec:
packageRef:
refName: cert-manager.tanzu.vmware.com
versionSelection:
constraints: ">0.0.0"
serviceAccountName: kapp-sa
#@ end
#@ end
126 changes: 126 additions & 0 deletions manifests/scdf.tanzu.japan.com/2.11.5/tanzu-postgres/overlay.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")


#@ if data.values.postgres.enabled:
#@ if data.values.postgres.package.install:
apiVersion: v1
kind: Namespace
metadata:
labels:
pod-security.kubernetes.io/enforce: baseline
name: postgres-install
---
apiVersion: v1
kind: Secret
metadata:
name: scdf-registry
namespace: postgres-install
annotations:
secretgen.carvel.dev/image-pull-secret: ""
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: e30K
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kapp-sa
namespace: postgres-install
secrets:
- name: scdf-registry
imagePullSecrets:
- name: scdf-registry
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: postgres-kapp-role-binding
namespace: postgres-install
subjects:
- kind: ServiceAccount
name: kapp-sa
namespace: postgres-install
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageRepository
metadata:
name: tds-pack
namespace: postgres-install
annotations:
kapp.k14s.io/change-group: "pkgr"
spec:
fetch:
imgpkgBundle:
image: #@ data.values.postgres.package.repo + ":" + data.values.postgres.package.version
---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageInstall
metadata:
name: postgres
namespace: postgres-install
annotations:
kapp.k14s.io/change-rule: "upsert after upserting pkg-cert"
spec:
serviceAccountName: kapp-sa
packageRef:
refName: postgres-operator.sql.tanzu.vmware.com
versionSelection:
constraints: #@ data.values.postgres.package.operator_version
values:
- secretRef:
name: change-default-reg-secret
---
apiVersion: v1
kind: Secret
metadata:
name: change-default-reg-secret
namespace: postgres-install
stringData:
change-default-reg-secret.yml: |
#@data/values-schema
---
dockerRegistrySecretName: scdf-registry
#@ end
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: postgres.sql.tanzu.vmware.com
annotations:
kapp.k14s.io/exists: ""
kapp.k14s.io/change-group: "tkcrd"
spec:
group: sql.tanzu.vmware.com
versions:
- name: v1
names:
kind: Postgres
scope: Namespaced
#@ count = data.values.postgres.count + 1
#@ for j in range(1,count):
---
apiVersion: sql.tanzu.vmware.com/v1
kind: Postgres
metadata:
name: #@ "postgres-1" + str(j)
namespace: scdf
annotations:
kapp.k14s.io/change-rule: "upsert after upserting tkcrd"
spec:
memory: 400Mi
cpu: "0.4"
storageSize: 10G
storageClassName: #@ data.values.postgres.storage_class
monitorStorageClassName: #@ data.values.postgres.storage_class
postgresVersion:
name: #@ data.values.postgres.instance_version
highAvailability:
enabled: false
#@ end
#@ end

136 changes: 136 additions & 0 deletions manifests/scdf.tanzu.japan.com/2.11.5/tanzu-rabbitmq/overlay.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")


#@ if data.values.rabbitmq.enabled:
#@ if data.values.rabbitmq.package.install:
apiVersion: v1
kind: Namespace
metadata:
name: rabbitmq-install
labels:
pod-security.kubernetes.io/enforce: baseline
---
apiVersion: v1
kind: Secret
metadata:
name: scdf-registry
namespace: rabbitmq-install
annotations:
secretgen.carvel.dev/image-pull-secret: ""
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: e30K
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kapp-sa
namespace: rabbitmq-install
secrets:
- name: scdf-registry
imagePullSecrets:
- name: scdf-registry
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rabbit-kapp-role-binding
namespace: rabbitmq-install
subjects:
- kind: ServiceAccount
name: kapp-sa
namespace: rabbitmq-install
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageRepository
metadata:
generation: 2
name: tmq-pack
namespace: rabbitmq-install
annotations:
kapp.k14s.io/change-group: "pkgr"
spec:
fetch:
imgpkgBundle:
image: #@ data.values.rabbitmq.package.repo + ":" + data.values.rabbitmq.package.version
---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageInstall
metadata:
name: rabbitmq
namespace: rabbitmq-install
annotations:
kapp.k14s.io/change-rule: "upsert after upserting pkg-cert"
ext.packaging.carvel.dev/ytt-paths-from-secret-name.0: "namespace-overlay"
spec:
serviceAccountName: kapp-sa
packageRef:
refName: rabbitmq.tanzu.vmware.com
versionSelection:
constraints: #@ data.values.rabbitmq.package.operator_version
---
apiVersion: v1
kind: Secret
metadata:
name: namespace-overlay
namespace: rabbitmq-install
stringData:
overlay.yaml: |
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind":"Namespace", "metadata": {"name": "rabbitmq-system"}}), expects="0+"
---
metadata:
labels:
#@overlay/match missing_ok=True
pod-security.kubernetes.io/enforce: baseline
#@ end
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: rabbitmqclusters.rabbitmq.com
annotations:
kapp.k14s.io/exists: ""
kapp.k14s.io/change-group: "tkcrd"
spec:
group: rabbitmq.com
versions:
- name: v1beta1
names:
kind: RabbitmqCluster
scope: Namespaced
#@ count = data.values.rabbitmq.count + 1
#@ for j in range(1,count):
---
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
name: #@ "rmq-" + str(j)
namespace: scdf
annotations:
kapp.k14s.io/change-rule: "upsert after upserting tkcrd"
spec:
imagePullSecrets:
- name: scdf-registry
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 250m
memory: 250Mi
rabbitmq:
additionalPlugins:
- rabbitmq_shovel
- rabbitmq_shovel_management
- rabbitmq_management
- rabbitmq_prometheus
- rabbitmq_peer_discovery_k8s
#@ end
#@ end
Loading

0 comments on commit 5738963

Please sign in to comment.