-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate SA names do not match csv deployment spec (#144)
OLM is unable to properly handle the case where a bundle author explicitly adds a hardcoded reference to a service account with a name that matches the name of the service account defined by the deployment spec in the CSV. This commit adds a validation method to ensure that the name of the service account in a bundle does not match deployment.Spec.Template.Spec.ServiceAccountName in the csv's spec
- Loading branch information
1 parent
9106367
commit 0fe04f8
Showing
8 changed files
with
395 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...idation/internal/testdata/invalid_bundle_sa/etcdbackups.etcd.database.coreos.com.crd.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: etcdbackups.etcd.database.coreos.com | ||
spec: | ||
group: etcd.database.coreos.com | ||
names: | ||
kind: EtcdBackup | ||
listKind: EtcdBackupList | ||
plural: etcdbackups | ||
singular: etcdbackup | ||
scope: Namespaced | ||
version: v1beta2 |
16 changes: 16 additions & 0 deletions
16
...dation/internal/testdata/invalid_bundle_sa/etcdclusters.etcd.database.coreos.com.crd.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: etcdclusters.etcd.database.coreos.com | ||
spec: | ||
group: etcd.database.coreos.com | ||
names: | ||
kind: EtcdCluster | ||
listKind: EtcdClusterList | ||
plural: etcdclusters | ||
shortNames: | ||
- etcdclus | ||
- etcd | ||
singular: etcdcluster | ||
scope: Namespaced | ||
version: v1beta2 |
309 changes: 309 additions & 0 deletions
309
...dation/internal/testdata/invalid_bundle_sa/etcdoperator.v0.9.4.clusterserviceversion.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
...dation/internal/testdata/invalid_bundle_sa/etcdrestores.etcd.database.coreos.com.crd.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: etcdrestores.etcd.database.coreos.com | ||
spec: | ||
group: etcd.database.coreos.com | ||
names: | ||
kind: EtcdRestore | ||
listKind: EtcdRestoreList | ||
plural: etcdrestores | ||
singular: etcdrestore | ||
scope: Namespaced | ||
version: v1beta2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kind: ServiceAccount | ||
apiVersion: v1 | ||
metadata: | ||
name: etcd-operator | ||
namespace: etcd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kind: ServiceAccount | ||
apiVersion: v1 | ||
metadata: | ||
name: etcd-operator2 | ||
namespace: etcd |