Skip to content

Commit

Permalink
fix: adds depends-on annotation for log-export
Browse files Browse the repository at this point in the history
  • Loading branch information
g-awmalik authored Aug 24, 2022
1 parent 5e0966b commit 7696fa4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions catalog/log-export/folder/logbucket-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ A log export on a folder that sinks to Cloud Logging Log Bucket
|-----------------|--------------------|------|-------|
| bucket-locked | false | bool | 1 |
| filter | | str | 0 |
| folder-k8s-name | my.folder.k8s.name | str | 3 |
| folder-k8s-name | my.folder.k8s.name | str | 4 |
| location | global | str | 2 |
| log-bucket-name | my-log-k8s-bucket | str | 2 |
| namespace | my-namespace | str | 4 |
| log-bucket-name | my-log-k8s-bucket | str | 3 |
| namespace | my-namespace | str | 6 |
| project-id | my-project-id | str | 6 |
| retention-days | 30 | int | 1 |

Expand Down
1 change: 1 addition & 0 deletions catalog/log-export/folder/logbucket-export/export.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ metadata:
namespace: my-namespace # kpt-set: ${namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/landing-zone:log-export/v0.4.0
config.kubernetes.io/depends-on: logging.cnrm.cloud.google.com/namespaces/my-namespace/LoggingLogBucket/my-log-k8s-bucket # kpt-set: logging.cnrm.cloud.google.com/namespaces/${namespace}/LoggingLogBucket/${log-bucket-name}
spec:
folderRef:
name: my.folder.k8s.name # kpt-set: ${folder-k8s-name}
Expand Down
3 changes: 2 additions & 1 deletion catalog/log-export/folder/logbucket-export/iam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ metadata:
namespace: logging # kpt-set: ${namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/landing-zone:log-export/v0.4.0
config.kubernetes.io/depends-on: logging.cnrm.cloud.google.com/namespaces/my-namespace/LoggingLogSink/my.folder.k8s.name-logbucketsink # kpt-set: logging.cnrm.cloud.google.com/namespaces/${namespace}/LoggingLogSink/${folder-k8s-name}-logbucketsink
spec:
memberFrom:
logSinkRef:
name: 123456789012-logbucketsink # kpt-set: ${folder-k8s-name}-logbucketsink
name: my.folder.k8s.name-logbucketsink # kpt-set: ${folder-k8s-name}-logbucketsink
resourceRef:
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Project
Expand Down
6 changes: 3 additions & 3 deletions catalog/log-export/org/logbucket-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ A log export on an organization that sinks to Cloud Logging Log Bucket
| bucket-locked | false | bool | 1 |
| filter | | str | 0 |
| location | global | str | 2 |
| log-bucket-name | my-log-k8s-bucket | str | 2 |
| namespace | my-namespace | str | 4 |
| org-id | 123456789012 | str | 3 |
| log-bucket-name | my-log-k8s-bucket | str | 3 |
| namespace | my-namespace | str | 6 |
| org-id | 123456789012 | str | 4 |
| project-id | my-project-id | str | 6 |
| retention-days | 30 | int | 1 |

Expand Down
3 changes: 2 additions & 1 deletion catalog/log-export/org/logbucket-export/export.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ metadata:
namespace: my-namespace # kpt-set: ${namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/landing-zone:log-export/v0.4.0
config.kubernetes.io/depends-on: logging.cnrm.cloud.google.com/namespaces/my-namespace/LoggingLogBucket/my-log-k8s-bucket # kpt-set: logging.cnrm.cloud.google.com/namespaces/${namespace}/LoggingLogBucket/${log-bucket-name}
spec:
organizationRef:
external: "123456789012" # kpt-set: ${org-id}
destination:
loggingLogBucketRef:
external: logging.googleapis.com/projects/my-project-id/locations/global/buckets/my-log-k8s-bucket # kpt-set: logging.googleapis.com/projects/${project-id}/locations/${location}/buckets/${log-bucket-name}
external: logging.googleapis.com/projects/my-project-id/locations/global/buckets/my-log-k8s-bucket # kpt-set: logging.googleapis.com/projects/${project-id}/locations/${location}/buckets/${log-bucket-name}
filter: "" # kpt-set: ${filter}
includeChildren: true
---
Expand Down
1 change: 1 addition & 0 deletions catalog/log-export/org/logbucket-export/iam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ metadata:
namespace: logging # kpt-set: ${namespace}
annotations:
cnrm.cloud.google.com/blueprint: cnrm/landing-zone:log-export/v0.4.0
config.kubernetes.io/depends-on: logging.cnrm.cloud.google.com/namespaces/my-namespace/LoggingLogSink/123456789012-logbucketsink # kpt-set: logging.cnrm.cloud.google.com/namespaces/${namespace}/LoggingLogSink/${org-id}-logbucketsink
spec:
memberFrom:
logSinkRef:
Expand Down

0 comments on commit 7696fa4

Please sign in to comment.