...

Source file src/sigs.k8s.io/kustomize/api/krusty/namespaces_test.go

Documentation: sigs.k8s.io/kustomize/api/krusty

     1  // Copyright 2019 The Kubernetes Authors.
     2  // SPDX-License-Identifier: Apache-2.0
     3  
     4  package krusty_test
     5  
     6  import (
     7  	"strings"
     8  	"testing"
     9  
    10  	kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
    11  )
    12  
    13  func TestNamespacedSecrets(t *testing.T) {
    14  	th := kusttest_test.MakeHarness(t)
    15  	th.WriteF("secrets.yaml", `
    16  apiVersion: v1
    17  kind: Secret
    18  metadata:
    19    name: dummy
    20    namespace: default
    21  type: Opaque
    22  data:
    23    dummy: ""
    24  ---
    25  apiVersion: v1
    26  kind: Secret
    27  metadata:
    28    name: dummy
    29    namespace: kube-system
    30  type: Opaque
    31  data:
    32    dummy: ""
    33  `)
    34  
    35  	// This should find the proper secret.
    36  	th.WriteF("role.yaml", `
    37  kind: ClusterRole
    38  apiVersion: rbac.authorization.k8s.io/v1
    39  metadata:
    40    name: dummy
    41  rules:
    42  - apiGroups: [""]
    43    resources: ["secrets"]
    44    resourceNames: ["dummy"]
    45    verbs: ["get"]
    46  `)
    47  
    48  	th.WriteK(".", `
    49  resources:
    50  - secrets.yaml
    51  - role.yaml
    52  `)
    53  	// This validates fix for Issue #1044. This should not be an error anymore -
    54  	// the secrets have the same name but are in different namespaces.
    55  	// The ClusterRole (by def) is not in a namespace,
    56  	// and in this case applies to *any* Secret resource
    57  	// named "dummy"
    58  	m := th.Run(".", th.MakeDefaultOptions())
    59  	th.AssertActualEqualsExpected(m, `
    60  apiVersion: v1
    61  data:
    62    dummy: ""
    63  kind: Secret
    64  metadata:
    65    name: dummy
    66    namespace: default
    67  type: Opaque
    68  ---
    69  apiVersion: v1
    70  data:
    71    dummy: ""
    72  kind: Secret
    73  metadata:
    74    name: dummy
    75    namespace: kube-system
    76  type: Opaque
    77  ---
    78  apiVersion: rbac.authorization.k8s.io/v1
    79  kind: ClusterRole
    80  metadata:
    81    name: dummy
    82  rules:
    83  - apiGroups:
    84    - ""
    85    resourceNames:
    86    - dummy
    87    resources:
    88    - secrets
    89    verbs:
    90    - get
    91  `)
    92  }
    93  
    94  func TestNameReferenceDeploymentIssue3489(t *testing.T) {
    95  	th := kusttest_test.MakeHarness(t)
    96  	th.WriteK("base", `
    97  resources:
    98  - cm.yaml
    99  - dep.yaml
   100  `)
   101  	th.WriteF("base/cm.yaml", `
   102  apiVersion: v1
   103  kind: ConfigMap
   104  metadata:
   105    name: myMap
   106  `)
   107  	th.WriteF("base/dep.yaml", `
   108  apiVersion: v1
   109  group: apps
   110  kind: Deployment
   111  metadata:
   112    name: myDep
   113  spec:
   114    template:
   115      spec:
   116        containers:
   117        - env:
   118          - name: CM_FOO
   119            valueFrom:
   120              configMapKeyRef:
   121                key: foo
   122                name: myMap
   123  `)
   124  	th.WriteK("ov1", `
   125  resources:
   126  - ../base
   127  namePrefix: pp-
   128  `)
   129  	th.WriteK("ov2", `
   130  resources:
   131  - ../base
   132  nameSuffix: -ss
   133  `)
   134  	th.WriteK("ov3", `
   135  resources:
   136  - ../base
   137  namespace: fred
   138  nameSuffix: -xx
   139  `)
   140  	th.WriteK(".", `
   141  resources:
   142  - ../ov1
   143  - ../ov2
   144  - ../ov3
   145  `)
   146  	m := th.Run(".", th.MakeDefaultOptions())
   147  	th.AssertActualEqualsExpected(m, `
   148  apiVersion: v1
   149  kind: ConfigMap
   150  metadata:
   151    name: pp-myMap
   152  ---
   153  apiVersion: v1
   154  group: apps
   155  kind: Deployment
   156  metadata:
   157    name: pp-myDep
   158  spec:
   159    template:
   160      spec:
   161        containers:
   162        - env:
   163          - name: CM_FOO
   164            valueFrom:
   165              configMapKeyRef:
   166                key: foo
   167                name: pp-myMap
   168  ---
   169  apiVersion: v1
   170  kind: ConfigMap
   171  metadata:
   172    name: myMap-ss
   173  ---
   174  apiVersion: v1
   175  group: apps
   176  kind: Deployment
   177  metadata:
   178    name: myDep-ss
   179  spec:
   180    template:
   181      spec:
   182        containers:
   183        - env:
   184          - name: CM_FOO
   185            valueFrom:
   186              configMapKeyRef:
   187                key: foo
   188                name: myMap-ss
   189  ---
   190  apiVersion: v1
   191  kind: ConfigMap
   192  metadata:
   193    name: myMap-xx
   194    namespace: fred
   195  ---
   196  apiVersion: v1
   197  group: apps
   198  kind: Deployment
   199  metadata:
   200    name: myDep-xx
   201    namespace: fred
   202  spec:
   203    template:
   204      spec:
   205        containers:
   206        - env:
   207          - name: CM_FOO
   208            valueFrom:
   209              configMapKeyRef:
   210                key: foo
   211                name: myMap-xx
   212  `)
   213  }
   214  
   215  // TestNameAndNsTransformation validates that NamespaceTransformer,
   216  // PrefixSuffixTransformer and namereference transformers are
   217  // able to deal with simultaneous change of namespace and name.
   218  func TestNameAndNsTransformation(t *testing.T) {
   219  	th := kusttest_test.MakeHarness(t)
   220  
   221  	th.WriteK(".", `
   222  namePrefix: p1-
   223  nameSuffix: -s1
   224  namespace: newnamespace
   225  resources:
   226  - resources.yaml
   227  `)
   228  
   229  	th.WriteF("resources.yaml", `
   230  apiVersion: v1
   231  kind: ConfigMap
   232  metadata:
   233    name: cm1
   234  ---
   235  apiVersion: v1
   236  kind: ConfigMap
   237  metadata:
   238    name: cm2
   239    namespace: ns1
   240  ---
   241  apiVersion: v1
   242  kind: Service
   243  metadata:
   244    name: svc1
   245    namespace: ns1
   246  ---
   247  apiVersion: v1
   248  kind: Service
   249  metadata:
   250    name: svc2
   251    namespace: ns1
   252  ---
   253  apiVersion: v1
   254  kind: ServiceAccount
   255  metadata:
   256    name: sa1
   257    namespace: ns1
   258  ---
   259  apiVersion: v1
   260  kind: ServiceAccount
   261  metadata:
   262    name: sa2
   263    namespace: ns1
   264  ---
   265  apiVersion: rbac.authorization.k8s.io/v1
   266  kind: ClusterRoleBinding
   267  metadata:
   268    name: manager-rolebinding
   269  subjects:
   270  - kind: ServiceAccount
   271    name: sa1
   272    namespace: ns1
   273  - kind: ServiceAccount
   274    name: sa2
   275    namespace: ns1
   276  - kind: ServiceAccount
   277    name: sa3
   278    namespace: random
   279  - kind: ServiceAccount
   280    name: default
   281    namespace: irrelevant
   282  ---
   283  apiVersion: admissionregistration.k8s.io/v1
   284  kind: ValidatingWebhookConfiguration
   285  metadata:
   286    name: example
   287  webhooks:
   288    - name: example1
   289      clientConfig:
   290        service:
   291          name: svc1
   292          namespace: ns1
   293    - name: example2
   294      clientConfig:
   295        service:
   296          name: svc2
   297          namespace: ns1
   298    - name: example3
   299      clientConfig:
   300        service:
   301          name: svc3
   302          namespace: random
   303  ---
   304  apiVersion: apiextensions.k8s.io/v1
   305  kind: CustomResourceDefinition
   306  metadata:
   307    name: crds.my.org
   308  ---
   309  apiVersion: apiextensions.k8s.io/v1
   310  kind: CustomResourceDefinition
   311  metadata:
   312    name: namespace.crds.my.org
   313  spec:
   314    conversion:
   315      strategy: Webhook
   316      webhook:
   317        clientConfig:
   318          service:
   319            name: crd-svc
   320            namespace: random
   321  ---
   322  apiVersion: rbac.authorization.k8s.io/v1
   323  kind: ClusterRole
   324  metadata:
   325    name: cr1
   326  ---
   327  apiVersion: rbac.authorization.k8s.io/v1
   328  kind: ClusterRoleBinding
   329  metadata:
   330    name: crb1
   331  subjects:
   332  - kind: ServiceAccount
   333    name: default
   334    namespace: irrelevant
   335  ---
   336  apiVersion: v1
   337  kind: PersistentVolume
   338  metadata:
   339    name: pv1
   340  `)
   341  	m := th.Run(".", th.MakeDefaultOptions())
   342  	th.AssertActualEqualsExpected(m, `
   343  apiVersion: v1
   344  kind: ConfigMap
   345  metadata:
   346    name: p1-cm1-s1
   347    namespace: newnamespace
   348  ---
   349  apiVersion: v1
   350  kind: ConfigMap
   351  metadata:
   352    name: p1-cm2-s1
   353    namespace: newnamespace
   354  ---
   355  apiVersion: v1
   356  kind: Service
   357  metadata:
   358    name: p1-svc1-s1
   359    namespace: newnamespace
   360  ---
   361  apiVersion: v1
   362  kind: Service
   363  metadata:
   364    name: p1-svc2-s1
   365    namespace: newnamespace
   366  ---
   367  apiVersion: v1
   368  kind: ServiceAccount
   369  metadata:
   370    name: p1-sa1-s1
   371    namespace: newnamespace
   372  ---
   373  apiVersion: v1
   374  kind: ServiceAccount
   375  metadata:
   376    name: p1-sa2-s1
   377    namespace: newnamespace
   378  ---
   379  apiVersion: rbac.authorization.k8s.io/v1
   380  kind: ClusterRoleBinding
   381  metadata:
   382    name: p1-manager-rolebinding-s1
   383  subjects:
   384  - kind: ServiceAccount
   385    name: p1-sa1-s1
   386    namespace: newnamespace
   387  - kind: ServiceAccount
   388    name: p1-sa2-s1
   389    namespace: newnamespace
   390  - kind: ServiceAccount
   391    name: sa3
   392    namespace: random
   393  - kind: ServiceAccount
   394    name: default
   395    namespace: newnamespace
   396  ---
   397  apiVersion: admissionregistration.k8s.io/v1
   398  kind: ValidatingWebhookConfiguration
   399  metadata:
   400    name: p1-example-s1
   401  webhooks:
   402  - clientConfig:
   403      service:
   404        name: p1-svc1-s1
   405        namespace: newnamespace
   406    name: example1
   407  - clientConfig:
   408      service:
   409        name: p1-svc2-s1
   410        namespace: newnamespace
   411    name: example2
   412  - clientConfig:
   413      service:
   414        name: svc3
   415        namespace: random
   416    name: example3
   417  ---
   418  apiVersion: apiextensions.k8s.io/v1
   419  kind: CustomResourceDefinition
   420  metadata:
   421    name: crds.my.org
   422  ---
   423  apiVersion: apiextensions.k8s.io/v1
   424  kind: CustomResourceDefinition
   425  metadata:
   426    name: namespace.crds.my.org
   427  spec:
   428    conversion:
   429      strategy: Webhook
   430      webhook:
   431        clientConfig:
   432          service:
   433            name: crd-svc
   434            namespace: newnamespace
   435  ---
   436  apiVersion: rbac.authorization.k8s.io/v1
   437  kind: ClusterRole
   438  metadata:
   439    name: p1-cr1-s1
   440  ---
   441  apiVersion: rbac.authorization.k8s.io/v1
   442  kind: ClusterRoleBinding
   443  metadata:
   444    name: p1-crb1-s1
   445  subjects:
   446  - kind: ServiceAccount
   447    name: default
   448    namespace: newnamespace
   449  ---
   450  apiVersion: v1
   451  kind: PersistentVolume
   452  metadata:
   453    name: p1-pv1-s1
   454  `)
   455  }
   456  
   457  // This series of constants is used to prove the need of
   458  // the namespace field in the objref field of the var declaration.
   459  // The following tests demonstrate that it creates umbiguous variable
   460  // declaration if two entities of the kind with the same name
   461  // but in different namespaces are declared.
   462  // This is tracking the following issue:
   463  // https://github.com/kubernetes-sigs/kustomize/issues/1298
   464  const namespaceNeedInVarMyApp string = `
   465  resources:
   466  - elasticsearch-dev-service.yaml
   467  - elasticsearch-test-service.yaml
   468  vars:
   469  - name: elasticsearch-test-service-name
   470    objref:
   471      kind: Service
   472      name: elasticsearch
   473      apiVersion: v1
   474    fieldref:
   475      fieldpath: metadata.name
   476  - name: elasticsearch-test-protocol
   477    objref:
   478      kind: Service
   479      name: elasticsearch
   480      apiVersion: v1
   481    fieldref:
   482      fieldpath: spec.ports[0].protocol
   483  - name: elasticsearch-dev-service-name
   484    objref:
   485      kind: Service
   486      name: elasticsearch
   487      apiVersion: v1
   488    fieldref:
   489      fieldpath: metadata.name
   490  - name: elasticsearch-dev-protocol
   491    objref:
   492      kind: Service
   493      name: elasticsearch
   494      apiVersion: v1
   495    fieldref:
   496      fieldpath: spec.ports[0].protocol
   497  `
   498  
   499  const namespaceNeedInVarDevResources string = `
   500  apiVersion: apps/v1
   501  kind: StatefulSet
   502  metadata:
   503    name: elasticsearch
   504    namespace: dev
   505  spec:
   506    template:
   507      spec:
   508        containers:
   509          - name: elasticsearch
   510            env:
   511              - name: DISCOVERY_SERVICE
   512                value: "$(elasticsearch-dev-service-name).monitoring.svc.cluster.local"
   513              - name: DISCOVERY_PROTOCOL
   514                value: "$(elasticsearch-dev-protocol)"
   515  ---
   516  apiVersion: v1
   517  kind: Service
   518  metadata:
   519    name: elasticsearch
   520    namespace: dev
   521  spec:
   522    ports:
   523      - name: transport
   524        port: 9300
   525        protocol: TCP
   526    clusterIP: None
   527  `
   528  
   529  const namespaceNeedInVarTestResources string = `
   530  apiVersion: apps/v1
   531  kind: StatefulSet
   532  metadata:
   533    name: elasticsearch
   534    namespace: test
   535  spec:
   536    template:
   537      spec:
   538        containers:
   539          - name: elasticsearch
   540            env:
   541              - name: DISCOVERY_SERVICE
   542                value: "$(elasticsearch-test-service-name).monitoring.svc.cluster.local"
   543              - name: DISCOVERY_PROTOCOL
   544                value: "$(elasticsearch-test-protocol)"
   545  ---
   546  apiVersion: v1
   547  kind: Service
   548  metadata:
   549    name: elasticsearch
   550    namespace: test
   551  spec:
   552    ports:
   553      - name: transport
   554        port: 9300
   555        protocol: UDP
   556    clusterIP: None
   557  `
   558  
   559  const namespaceNeedInVarExpectedOutput string = `
   560  apiVersion: apps/v1
   561  kind: StatefulSet
   562  metadata:
   563    name: elasticsearch
   564    namespace: dev
   565  spec:
   566    template:
   567      spec:
   568        containers:
   569        - env:
   570          - name: DISCOVERY_SERVICE
   571            value: elasticsearch.monitoring.svc.cluster.local
   572          - name: DISCOVERY_PROTOCOL
   573            value: TCP
   574          name: elasticsearch
   575  ---
   576  apiVersion: v1
   577  kind: Service
   578  metadata:
   579    name: elasticsearch
   580    namespace: dev
   581  spec:
   582    clusterIP: None
   583    ports:
   584    - name: transport
   585      port: 9300
   586      protocol: TCP
   587  ---
   588  apiVersion: apps/v1
   589  kind: StatefulSet
   590  metadata:
   591    name: elasticsearch
   592    namespace: test
   593  spec:
   594    template:
   595      spec:
   596        containers:
   597        - env:
   598          - name: DISCOVERY_SERVICE
   599            value: elasticsearch.monitoring.svc.cluster.local
   600          - name: DISCOVERY_PROTOCOL
   601            value: UDP
   602          name: elasticsearch
   603  ---
   604  apiVersion: v1
   605  kind: Service
   606  metadata:
   607    name: elasticsearch
   608    namespace: test
   609  spec:
   610    clusterIP: None
   611    ports:
   612    - name: transport
   613      port: 9300
   614      protocol: UDP
   615  `
   616  
   617  // TestVariablesAmbiguous demonstrates how two variables pointing at two different resources
   618  // using the same name in different namespaces are treated as ambiguous if the namespace is
   619  // not specified
   620  func TestVariablesAmbiguous(t *testing.T) {
   621  	th := kusttest_test.MakeHarness(t)
   622  	th.WriteK(".", namespaceNeedInVarMyApp)
   623  	th.WriteF("elasticsearch-dev-service.yaml",
   624  		namespaceNeedInVarDevResources)
   625  	th.WriteF("elasticsearch-test-service.yaml",
   626  		namespaceNeedInVarTestResources)
   627  	err := th.RunWithErr(".", th.MakeDefaultOptions())
   628  	if err == nil {
   629  		t.Fatalf("expected error")
   630  	}
   631  	if !strings.Contains(err.Error(), "unable to disambiguate") {
   632  		t.Fatalf("unexpected error %v", err)
   633  	}
   634  }
   635  
   636  const namespaceNeedInVarDevFolder string = `
   637  resources:
   638  - elasticsearch-dev-service.yaml
   639  vars:
   640  - name: elasticsearch-dev-service-name
   641    objref:
   642      kind: Service
   643      name: elasticsearch
   644      apiVersion: v1
   645    fieldref:
   646      fieldpath: metadata.name
   647  - name: elasticsearch-dev-protocol
   648    objref:
   649      kind: Service
   650      name: elasticsearch
   651      apiVersion: v1
   652    fieldref:
   653      fieldpath: spec.ports[0].protocol
   654  `
   655  
   656  const namespaceNeedInVarTestFolder string = `
   657  resources:
   658  - elasticsearch-test-service.yaml
   659  vars:
   660  - name: elasticsearch-test-service-name
   661    objref:
   662      kind: Service
   663      name: elasticsearch
   664      apiVersion: v1
   665    fieldref:
   666      fieldpath: metadata.name
   667  - name: elasticsearch-test-protocol
   668    objref:
   669      kind: Service
   670      name: elasticsearch
   671      apiVersion: v1
   672    fieldref:
   673      fieldpath: spec.ports[0].protocol
   674  `
   675  
   676  // TestVariablesAmbiguousWorkaround demonstrates a possible workaround
   677  // to TestVariablesAmbiguous problem. It requires to separate the variables
   678  // and resources into multiple kustomization context/folders instead of one.
   679  func TestVariablesAmbiguousWorkaround(t *testing.T) {
   680  	th := kusttest_test.MakeHarness(t)
   681  	opts := th.MakeDefaultOptions()
   682  	th.WriteK("dev", namespaceNeedInVarDevFolder)
   683  	th.WriteF("dev/elasticsearch-dev-service.yaml", namespaceNeedInVarDevResources)
   684  	th.WriteK("test", namespaceNeedInVarTestFolder)
   685  	th.WriteF("test/elasticsearch-test-service.yaml", namespaceNeedInVarTestResources)
   686  	th.WriteK("workaround", `
   687  resources:
   688  - ../dev
   689  - ../test
   690  `)
   691  	m := th.Run("workaround", opts)
   692  	th.AssertActualEqualsExpected(m, namespaceNeedInVarExpectedOutput)
   693  }
   694  
   695  //nolint:gosec
   696  const namespaceNeedInVarMyAppWithNamespace string = `
   697  resources:
   698  - elasticsearch-dev-service.yaml
   699  - elasticsearch-test-service.yaml
   700  vars:
   701  - name: elasticsearch-test-service-name
   702    objref:
   703      kind: Service
   704      name: elasticsearch
   705      namespace: test
   706      apiVersion: v1
   707    fieldref:
   708      fieldpath: metadata.name
   709  - name: elasticsearch-test-protocol
   710    objref:
   711      kind: Service
   712      name: elasticsearch
   713      namespace: test
   714      apiVersion: v1
   715    fieldref:
   716      fieldpath: spec.ports[0].protocol
   717  - name: elasticsearch-dev-service-name
   718    objref:
   719      kind: Service
   720      name: elasticsearch
   721      namespace: dev
   722      apiVersion: v1
   723    fieldref:
   724      fieldpath: metadata.name
   725  - name: elasticsearch-dev-protocol
   726    objref:
   727      kind: Service
   728      name: elasticsearch
   729      namespace: dev
   730      apiVersion: v1
   731    fieldref:
   732      fieldpath: spec.ports[0].protocol
   733  `
   734  
   735  // TestVariablesDisambiguatedWithNamespace demonstrates that adding the namespace
   736  // to the variable declarations allows to disambiguate the variables.
   737  func TestVariablesDisambiguatedWithNamespace(t *testing.T) {
   738  	th := kusttest_test.MakeHarness(t)
   739  	th.WriteK(".", namespaceNeedInVarMyAppWithNamespace)
   740  	th.WriteF("elasticsearch-dev-service.yaml", namespaceNeedInVarDevResources)
   741  	th.WriteF("elasticsearch-test-service.yaml", namespaceNeedInVarTestResources)
   742  	m := th.Run(".", th.MakeDefaultOptions())
   743  	th.AssertActualEqualsExpected(m, namespaceNeedInVarExpectedOutput)
   744  }
   745  
   746  // TestAddNamePrefixWithNamespace tests that adding a name prefix works within
   747  // namespaces other than the default namespace.
   748  // Test for issue #3430
   749  func TestAddNamePrefixWithNamespace(t *testing.T) {
   750  	th := kusttest_test.MakeHarness(t)
   751  
   752  	th.WriteF("serviceaccount.yaml", `
   753  apiVersion: v1
   754  kind: ServiceAccount
   755  metadata:
   756    name: prometheus
   757  `)
   758  
   759  	th.WriteF("clusterrolebinding.yaml", `
   760  apiVersion: rbac.authorization.k8s.io/v1beta1
   761  kind: ClusterRoleBinding
   762  metadata:
   763    name: prometheus
   764  roleRef:
   765    apiGroup: rbac.authorization.k8s.io
   766    kind: ClusterRole
   767    name: prometheus
   768  subjects:
   769  - kind: ServiceAccount
   770    name: prometheus
   771    namespace: iter8-monitoring
   772  `)
   773  
   774  	th.WriteK(".", `
   775  namePrefix: iter8-
   776  namespace: iter8-monitoring
   777  resources:
   778  - clusterrolebinding.yaml
   779  - serviceaccount.yaml
   780  `)
   781  
   782  	m := th.Run(".", th.MakeDefaultOptions())
   783  	th.AssertActualEqualsExpected(m, `
   784  apiVersion: rbac.authorization.k8s.io/v1beta1
   785  kind: ClusterRoleBinding
   786  metadata:
   787    name: iter8-prometheus
   788  roleRef:
   789    apiGroup: rbac.authorization.k8s.io
   790    kind: ClusterRole
   791    name: prometheus
   792  subjects:
   793  - kind: ServiceAccount
   794    name: iter8-prometheus
   795    namespace: iter8-monitoring
   796  ---
   797  apiVersion: v1
   798  kind: ServiceAccount
   799  metadata:
   800    name: iter8-prometheus
   801    namespace: iter8-monitoring
   802  `)
   803  }
   804  
   805  // Demonstrates that metadata.name is only overridden for a kind: Namespace with apiVersion: v1
   806  // Test for issue #5072
   807  func TestNameNotOveriddenForNonCoreApiVersionOnANamespaceKind(t *testing.T) {
   808  	th := kusttest_test.MakeHarness(t)
   809  
   810  	th.WriteF("azure-servicebus.yaml", `
   811  apiVersion: servicebus.azure.com/v1beta20210101preview
   812  kind: Namespace
   813  metadata:
   814    name: core-sb-99
   815    namespace: without-podinfo
   816  `)
   817  	th.WriteK(".", `
   818  namespace: podinfo
   819  resources:
   820    - azure-servicebus.yaml
   821  `)
   822  
   823  	m := th.Run(".", th.MakeDefaultOptions())
   824  	th.AssertActualEqualsExpected(m, `
   825  apiVersion: servicebus.azure.com/v1beta20210101preview
   826  kind: Namespace
   827  metadata:
   828    name: core-sb-99
   829    namespace: podinfo
   830  `)
   831  }
   832  

View as plain text