Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
08045d0
bank-of-anthos: monolith package
droot Sep 2, 2022
2609576
added namespace
droot Sep 2, 2022
ce6a2f5
base-app: first version
droot Sep 3, 2022
ce016c3
frontend: bank of anthos frontend package without customization
droot Sep 3, 2022
ea61b0b
base-app: renamed the env configmap
droot Sep 3, 2022
b571e0d
frontend: initial import of frontend package
droot Sep 3, 2022
3546f51
ledger-db: initial package
droot Sep 3, 2022
2f6693c
accounts-db: initial version
droot Sep 3, 2022
6a42dfa
contacts: initial version of contacts
droot Sep 3, 2022
c0e4498
base-app: added NAMESPACE env variable
droot Sep 3, 2022
a5502a9
balancereader: initial version
droot Sep 3, 2022
eada93a
ledgerwriter: initial version
droot Sep 3, 2022
1c963e2
loadgenerator: initial version of loadgenerator
droot Sep 3, 2022
8752fc7
base-app: made the base-app minimal
droot Sep 6, 2022
237fce5
base-app: added set-namespace
droot Sep 6, 2022
7d2f5ae
frontend: removed it
droot Sep 6, 2022
dc6bc17
base-app: added set-labels
droot Sep 6, 2022
1f7d94a
base-app: added capability to rename resources
droot Sep 6, 2022
592da52
base-app: added set-image functionality
droot Sep 6, 2022
0e8fc7c
frontend: initial version of frontend
droot Sep 6, 2022
54d41d0
frontend: initial import
droot Sep 6, 2022
737a2d9
frontend: customization complete
droot Sep 6, 2022
75dd7c7
frontend-dev: initial version of frontend-dev
droot Sep 6, 2022
907006c
frontend: customized environment variable
droot Sep 6, 2022
1da4075
frontend-dev: rebased with the upstream changes
droot Sep 6, 2022
c959e85
fn-config-setimage.yaml
droot Sep 6, 2022
8fa58c9
frontend: updated to latest base-app
droot Sep 6, 2022
55458bf
frontend: added service-api and demo configuration
droot Sep 6, 2022
00281ad
frontend-dev: resolved all the dependencies
droot Sep 6, 2022
5977900
contacts: reinitialized the package
droot Sep 6, 2022
cf58241
contacts-dev: initialized deployable instance
droot Sep 6, 2022
ab2f631
balancereader: reinitialized the package
droot Sep 6, 2022
fac064d
balancereader-dev: created deployable instance
droot Sep 6, 2022
7b68923
ledgerwriter: reinitialized
droot Sep 7, 2022
b6c2919
ledgerwriter: added missing files
droot Sep 7, 2022
44efb8f
ledgerwriter-dev: added the deployable instance
droot Sep 7, 2022
794ca90
transactionhistory: added initial version
droot Sep 7, 2022
fa21da5
transactionhistory-dev: created a deployable instance
droot Sep 7, 2022
4eb1974
userservice: added initial version
droot Sep 7, 2022
f5fcc16
userservice-dev: created a deployable instance
droot Sep 7, 2022
2fa6bbc
base-db: initial version
droot Sep 7, 2022
4c4d5c5
base-db: updated db config
droot Sep 7, 2022
f584104
base-db: updated setname function
droot Sep 7, 2022
ec20a32
accounts-db: initial package
droot Sep 7, 2022
ad8cd97
base-db: added missing configmaps
droot Sep 7, 2022
5024944
accounts-db-dev: deployble instance
droot Sep 7, 2022
6595959
base-db: updated labels
droot Sep 7, 2022
eeae7d2
ledger-db: reinitialized
droot Sep 7, 2022
3eba471
ledger-db-dev: initialized dev instance for ledger-db
droot Sep 7, 2022
a6f36bc
bank-of-anthos-dev*: all instance level changes
droot Sep 8, 2022
ba18d84
update blueprints
droot Sep 8, 2022
149a430
frontend: rebased with base-app
droot Sep 8, 2022
958c37b
balancereader: rebased
droot Sep 8, 2022
b296326
contacts: rebased
droot Sep 8, 2022
b084e21
ledgerwriter: rebased
droot Sep 8, 2022
6081184
transactionhistory: rebased
droot Sep 8, 2022
08c7473
userservice: rebased
droot Sep 8, 2022
86e485d
frontend-dev: rebased
droot Sep 8, 2022
d512113
accounts-db-dev: rebased
droot Sep 8, 2022
f19f5da
balancereader-db-dev: rebased
droot Sep 8, 2022
b1cb714
contacts-dev: rebased
droot Sep 8, 2022
87f86bf
ledger-db-dev: rebased
droot Sep 8, 2022
561b6b8
ledgerwriter-dev: rebased
droot Sep 8, 2022
91fd6cf
transactionhistory-dev: rebased
droot Sep 8, 2022
9ffb5c2
userservice-dev: rebased
droot Sep 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions accounts-db-dev/Kptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: kpt.dev/v1
kind: Kptfile
metadata:
name: accounts-db-dev
labels:
app: accounts-db
annotations:
config.kubernetes.io/local-config: "true"
upstream:
type: git
git:
repo: git@github.com:droot/kpt-samples
directory: /accounts-db
ref: bank-of-anthos-pkgs
updateStrategy: resource-merge
upstreamLock:
type: git
git:
repo: git@github.com:droot/kpt-samples
directory: /accounts-db
ref: bank-of-anthos-pkgs
commit: 08c7473c2b4b641c1efb4a520c39c551b87eda0b
info:
description: sample description
pipeline:
mutators:
- image: set-namespace:v0.4.1
configPath: package-context.yaml
- image: set-labels:v0.1.5
configPath: fn-config-setlabels.yaml
- image: starlark:v0.4.3
configPath: fn-config-setname.yaml
- image: set-image:v0.1.1
configPath: fn-config-setimage.yaml
21 changes: 21 additions & 0 deletions accounts-db-dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# base-db

## Description
sample description

## Usage

### Fetch the package
`kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] base-db`
Details: https://kpt.dev/reference/cli/pkg/get/

### View package content
`kpt pkg tree base-db`
Details: https://kpt.dev/reference/cli/pkg/tree/

### Apply the package
```
kpt live init base-db
kpt live apply base-db --reconcile-timeout=2m --output=table
```
Details: https://kpt.dev/reference/cli/live/
14 changes: 14 additions & 0 deletions accounts-db-dev/configmap-db-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata: # kpt-merge: example/db-config
name: db-config
namespace: accounts-db-dev
labels:
app: accounts-db
annotations:
internal.kpt.dev/upstream-identifier: '|ConfigMap|example|db-config'
data:
POSTGRES_DB: db
POSTGRES_USER: db-admin
POSTGRES_PASSWORD: db-pwd
ACCOUNTS_DB_URI: postgresql://db-admin:db-pwd@base-db:5432/base-db
14 changes: 14 additions & 0 deletions accounts-db-dev/configmap-demo-data.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata: # kpt-merge: accounts-db-dev/demo-data-config
name: demo-data-config
namespace: accounts-db-dev
labels:
app: accounts-db
annotations:
internal.kpt.dev/upstream-identifier: '|ConfigMap|accounts-db-dev|demo-data-config'
data:
USE_DEMO_DATA: "True"
DEMO_LOGIN_USERNAME: testuser
# All demo user accounts are hardcoded to use the login password 'bankofanthos'
DEMO_LOGIN_PASSWORD: bankofanthos
12 changes: 12 additions & 0 deletions accounts-db-dev/configmap-env-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata: # kpt-merge: accounts-db-dev/environment-config
name: environment-config
namespace: accounts-db-dev
labels:
app: accounts-db
annotations:
internal.kpt.dev/upstream-identifier: '|ConfigMap|accounts-db-dev|environment-config'
data:
LOCAL_ROUTING_NUM: "883745000"
PUB_KEY_PATH: /tmp/.ssh/publickey
13 changes: 13 additions & 0 deletions accounts-db-dev/fn-config-setimage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: fn.kpt.dev/v1alpha1
kind: SetImage
metadata: # kpt-merge: /set-image
name: set-image
labels:
app: accounts-db
annotations:
config.kubernetes.io/local-config: "true"
internal.kpt.dev/upstream-identifier: fn.kpt.dev|SetImage|default|set-image
image:
name: gcr.io/bank-of-anthos-ci/base-db
newName: gcr.io/bank-of-anthos-ci/accounts-db
newTag: v0.5.6
11 changes: 11 additions & 0 deletions accounts-db-dev/fn-config-setlabels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: fn.kpt.dev/v1alpha1
kind: SetLabels
metadata: # kpt-merge: /set-labels
name: set-labels
labels:
app: accounts-db
annotations:
config.kubernetes.io/local-config: "true"
internal.kpt.dev/upstream-identifier: fn.kpt.dev|SetLabels|default|set-labels
labels:
app: accounts-db
33 changes: 33 additions & 0 deletions accounts-db-dev/fn-config-setname.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: fn.kpt.dev/v1alpha1
kind: StarlarkRun
metadata: # kpt-merge: /set-name
name: set-name
labels:
app: accounts-db
annotations:
config.kubernetes.io/local-config: "true"
internal.kpt.dev/upstream-identifier: fn.kpt.dev|StarlarkRun|default|set-name
source: |-
def set_name(resources):
pkgName = ""
isAbstractPackage = False
for resource in resources:
if resource["kind"] == "ConfigMap" and resource["metadata"]["name"] == "kptfile.kpt.dev" and resource["data"]["name"] == "example":
isAbstractPackage = True
if resource["kind"] == "Kptfile":
pkgName = resource["metadata"]["name"]
if not isAbstractPackage:
# update resource name only if this is an abstract blueprint
return
if pkgName == "":
fail("package must have a name.")
return

for resource in ctx.resource_list["items"]:
if resource["kind"] == "Service":
resource["metadata"]["name"] = pkgName
if resource["kind"] == "StatefulSet":
resource["metadata"]["name"] = pkgName
resource["spec"]["serviceName"] = pkgName

set_name(ctx.resource_list["items"])
11 changes: 11 additions & 0 deletions accounts-db-dev/package-context.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata: # kpt-merge: /kptfile.kpt.dev
name: kptfile.kpt.dev
labels:
app: accounts-db
annotations:
config.kubernetes.io/local-config: "true"
internal.kpt.dev/upstream-identifier: '|ConfigMap|default|kptfile.kpt.dev'
data:
name: accounts-db-dev
10 changes: 10 additions & 0 deletions accounts-db-dev/resourcegroup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kpt.dev/v1alpha1
kind: ResourceGroup
metadata: # kpt-merge: accounts-db-dev/inventory-99865161
name: inventory-99865161
namespace: accounts-db-dev
labels:
cli-utils.sigs.k8s.io/inventory-id: 2aca04e392c4f17d91507bedbcc8719d050a9806-1662581639705790000
app: accounts-db
annotations:
internal.kpt.dev/upstream-identifier: kpt.dev|ResourceGroup|accounts-db-dev|inventory-99865161
19 changes: 19 additions & 0 deletions accounts-db-dev/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata: # kpt-merge: example/base-db
name: accounts-db
labels:
tier: db
app: accounts-db
namespace: accounts-db-dev
annotations:
internal.kpt.dev/upstream-identifier: '|Service|example|base-db'
spec:
ports:
- port: 5432
name: tcp
targetPort: 5432
protocol: TCP
selector:
tier: db
app: accounts-db
65 changes: 65 additions & 0 deletions accounts-db-dev/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# [START gke_boa_kubernetes_manifests_accounts_db_statefulset_accounts_db]
kind: StatefulSet
apiVersion: apps/v1
metadata: # kpt-merge: example/base-db
name: accounts-db
labels:
tier: db
app: accounts-db
namespace: accounts-db-dev
annotations:
internal.kpt.dev/upstream-identifier: apps|StatefulSet|example|base-db
spec:
serviceName: accounts-db
replicas: 1
selector:
matchLabels:
tier: db
app: accounts-db
template:
metadata:
labels:
tier: db
app: accounts-db
spec:
serviceAccountName: default
containers:
- name: primary
image: gcr.io/bank-of-anthos-ci/accounts-db:v0.5.6
envFrom:
- configMapRef:
name: environment-config
- configMapRef:
name: db-config
- configMapRef:
name: demo-data-config
ports:
- containerPort: 5432
name: postgredb
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 250m
memory: 512Mi
volumeMounts:
- name: postgresdb
mountPath: /var/lib/postgresql/data
subPath: postgres
volumes:
- name: postgresdb
emptyDir: {}
34 changes: 34 additions & 0 deletions accounts-db/Kptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: kpt.dev/v1
kind: Kptfile
metadata:
name: accounts-db
labels:
app: accounts-db
annotations:
config.kubernetes.io/local-config: "true"
upstream:
type: git
git:
repo: git@github.com:droot/kpt-samples
directory: /base-db
ref: bank-of-anthos-pkgs
updateStrategy: resource-merge
upstreamLock:
type: git
git:
repo: git@github.com:droot/kpt-samples
directory: /base-db
ref: bank-of-anthos-pkgs
commit: 4c4d5c5e2b5fe6dea6851f5985e33711afc753f8
info:
description: sample description
pipeline:
mutators:
- image: set-namespace:v0.4.1
configPath: package-context.yaml
- image: set-labels:v0.1.5
configPath: fn-config-setlabels.yaml
- image: starlark:v0.4.3
configPath: fn-config-setname.yaml
- image: set-image:v0.1.1
configPath: fn-config-setimage.yaml
21 changes: 21 additions & 0 deletions accounts-db/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# base-db

## Description
sample description

## Usage

### Fetch the package
`kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] base-db`
Details: https://kpt.dev/reference/cli/pkg/get/

### View package content
`kpt pkg tree base-db`
Details: https://kpt.dev/reference/cli/pkg/tree/

### Apply the package
```
kpt live init base-db
kpt live apply base-db --reconcile-timeout=2m --output=table
```
Details: https://kpt.dev/reference/cli/live/
14 changes: 14 additions & 0 deletions accounts-db/configmap-db-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata: # kpt-merge: example/db-config
name: db-config
namespace: example
annotations:
internal.kpt.dev/upstream-identifier: '|ConfigMap|example|db-config'
labels:
app: accounts-db
data:
POSTGRES_DB: db
POSTGRES_USER: db-admin
POSTGRES_PASSWORD: db-pwd
ACCOUNTS_DB_URI: postgresql://db-admin:db-pwd@base-db:5432/base-db
13 changes: 13 additions & 0 deletions accounts-db/fn-config-setimage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: fn.kpt.dev/v1alpha1
kind: SetImage
metadata: # kpt-merge: /set-image
name: set-image
labels:
app: accounts-db
annotations:
config.kubernetes.io/local-config: "true"
internal.kpt.dev/upstream-identifier: fn.kpt.dev|SetImage|default|set-image
image:
name: gcr.io/bank-of-anthos-ci/base-db
newName: gcr.io/bank-of-anthos-ci/accounts-db
newTag: v0.5.6
11 changes: 11 additions & 0 deletions accounts-db/fn-config-setlabels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: fn.kpt.dev/v1alpha1
kind: SetLabels
metadata: # kpt-merge: /set-labels
name: set-labels
labels:
app: accounts-db
annotations:
config.kubernetes.io/local-config: "true"
internal.kpt.dev/upstream-identifier: fn.kpt.dev|SetLabels|default|set-labels
labels:
app: accounts-db
Loading