Skip to content

Commit

Permalink
fix: namespace manifest
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Forster <andreas.forster@pepperize.com>
  • Loading branch information
pflorek and acfo committed Apr 21, 2022
1 parent a752db0 commit eaf6706
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 24 deletions.
17 changes: 11 additions & 6 deletions src/cloudwatch-metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ export class CloudwatchMetrics extends Construct {

const namespace = props.namespace ?? "metrics";

const namespaceManifest = props.cluster.addManifest("Namespace", {
apiVersion: "v1",
kind: "Namespace",
metadata: {
name: namespace,
},
const namespaceManifest = new eks.KubernetesManifest(this, "Namespace", {
cluster: props.cluster,
manifest: [
{
apiVersion: "v1",
kind: "Namespace",
metadata: {
name: namespace,
},
},
],
});

const serviceAccount = new eks.ServiceAccount(this, "ServiceAccount", {
Expand Down
17 changes: 11 additions & 6 deletions src/external-dns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ export class ExternalDns extends Construct {

const namespace = props.namespace ?? "dns";

const namespaceManifest = props.cluster.addManifest("Namespace", {
apiVersion: "v1",
kind: "Namespace",
metadata: {
name: namespace,
},
const namespaceManifest = new eks.KubernetesManifest(this, "Namespace", {
cluster: props.cluster,
manifest: [
{
apiVersion: "v1",
kind: "Namespace",
metadata: {
name: namespace,
},
},
],
});

if (props.hostedZoneIds.length == 0) {
Expand Down
17 changes: 11 additions & 6 deletions src/external-secrets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ export class ExternalSecrets extends Construct {

const namespace = props.namespace ?? "secrets";

const namespaceManifest = props.cluster.addManifest("Namespace", {
apiVersion: "v1",
kind: "Namespace",
metadata: {
name: namespace,
},
const namespaceManifest = new eks.KubernetesManifest(this, "Namespace", {
cluster: props.cluster,
manifest: [
{
apiVersion: "v1",
kind: "Namespace",
metadata: {
name: namespace,
},
},
],
});

// https://external-secrets.io/v0.5.1/provider-aws-secrets-manager/#aws-authentication
Expand Down
17 changes: 11 additions & 6 deletions src/fluent-bit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@ export class FluentBit extends Construct {

const namespace = props.namespace ?? "logging";

const namespaceManifest = props.cluster.addManifest("Namespace", {
apiVersion: "v1",
kind: "Namespace",
metadata: {
name: namespace,
},
const namespaceManifest = new eks.KubernetesManifest(this, "Namespace", {
cluster: props.cluster,
manifest: [
{
apiVersion: "v1",
kind: "Namespace",
metadata: {
name: namespace,
},
},
],
});

const serviceAccount = new eks.ServiceAccount(this, "ServiceAccount", {
Expand Down

0 comments on commit eaf6706

Please sign in to comment.