@soft-stech/fleet
Version:
96 lines (95 loc) • 2.76 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GitRepoRestriction = void 0;
const IoK8sApimachineryPkgApisMetaV1ObjectMeta_1 = require("@soft-stech/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta");
const base_1 = require("@soft-stech/base");
const validate_1 = require("@soft-stech/validate");
const schemaId = "fleet.cattle.io.v1alpha1.GitRepoRestriction";
const schema = {
"type": "object",
"properties": {
"allowedClientSecretNames": {
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"allowedRepoPatterns": {
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"allowedServiceAccounts": {
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"allowedTargetNamespaces": {
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"apiVersion": {
"type": "string",
"enum": [
"fleet.cattle.io/v1alpha1"
]
},
"defaultClientSecretName": {
"nullable": true,
"type": "string"
},
"defaultServiceAccount": {
"nullable": true,
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"GitRepoRestriction"
]
},
"metadata": {
"oneOf": [
{
"$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"
},
{
"type": "null"
}
]
}
},
"required": [
"apiVersion",
"kind"
]
};
/**
* GitRepoRestriction is a resource that can optionally be used to restrict
* the options of GitRepos in the same namespace.
*/
class GitRepoRestriction extends base_1.Model {
constructor(data) {
super({
apiVersion: GitRepoRestriction.apiVersion,
kind: GitRepoRestriction.kind,
...data
});
}
}
exports.GitRepoRestriction = GitRepoRestriction;
GitRepoRestriction.apiVersion = "fleet.cattle.io/v1alpha1";
GitRepoRestriction.kind = "GitRepoRestriction";
GitRepoRestriction.is = (0, base_1.createTypeMetaGuard)(GitRepoRestriction);
(0, base_1.setSchema)(GitRepoRestriction, schemaId, () => {
(0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)();
(0, validate_1.register)(schemaId, schema);
});