diff --git a/pkg/model/deployment_source.pb.go b/pkg/model/deployment_source.pb.go index aa44d082bb..b44071830a 100644 --- a/pkg/model/deployment_source.pb.go +++ b/pkg/model/deployment_source.pb.go @@ -45,6 +45,9 @@ type DeploymentSource struct { Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"` // The configuration of the application which is specific for plugins. ApplicationConfig []byte `protobuf:"bytes,3,opt,name=application_config,json=applicationConfig,proto3" json:"application_config,omitempty"` + // The filename of the application configuration file. + // The plugins can use this to avoid mistakenly reading this file as a manifest. + ApplicationConfigFilename string `protobuf:"bytes,4,opt,name=application_config_filename,json=applicationConfigFilename,proto3" json:"application_config_filename,omitempty"` } func (x *DeploymentSource) Reset() { @@ -100,12 +103,19 @@ func (x *DeploymentSource) GetApplicationConfig() []byte { return nil } +func (x *DeploymentSource) GetApplicationConfigFilename() string { + if x != nil { + return x.ApplicationConfigFilename + } + return "" +} + var File_pkg_model_deployment_source_proto protoreflect.FileDescriptor var file_pkg_model_deployment_source_proto_rawDesc = []byte{ 0x0a, 0x21, 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x92, 0x01, 0x0a, 0x10, 0x44, + 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0xd2, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, @@ -114,7 +124,11 @@ var file_pkg_model_deployment_source_proto_rawDesc = []byte{ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x3e, 0x0a, 0x1b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x25, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x2d, 0x63, 0x64, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x63, 0x64, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/pkg/model/deployment_source.pb.validate.go b/pkg/model/deployment_source.pb.validate.go index 79e6c58d4f..484099d384 100644 --- a/pkg/model/deployment_source.pb.validate.go +++ b/pkg/model/deployment_source.pb.validate.go @@ -63,6 +63,8 @@ func (m *DeploymentSource) validate(all bool) error { // no validation rules for ApplicationConfig + // no validation rules for ApplicationConfigFilename + if len(errors) > 0 { return DeploymentSourceMultiError(errors) } diff --git a/pkg/model/deployment_source.proto b/pkg/model/deployment_source.proto index f9a24ff278..efa35ba789 100644 --- a/pkg/model/deployment_source.proto +++ b/pkg/model/deployment_source.proto @@ -25,4 +25,7 @@ message DeploymentSource { string revision = 2; // The configuration of the application which is specific for plugins. bytes application_config = 3; + // The filename of the application configuration file. + // The plugins can use this to avoid mistakenly reading this file as a manifest. + string application_config_filename = 4; } diff --git a/web/model/deployment_source_pb.d.ts b/web/model/deployment_source_pb.d.ts index eb41955001..8e48c1df44 100644 --- a/web/model/deployment_source_pb.d.ts +++ b/web/model/deployment_source_pb.d.ts @@ -14,6 +14,9 @@ export class DeploymentSource extends jspb.Message { getApplicationConfig_asB64(): string; setApplicationConfig(value: Uint8Array | string): DeploymentSource; + getApplicationConfigFilename(): string; + setApplicationConfigFilename(value: string): DeploymentSource; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DeploymentSource.AsObject; static toObject(includeInstance: boolean, msg: DeploymentSource): DeploymentSource.AsObject; @@ -27,6 +30,7 @@ export namespace DeploymentSource { applicationDirectory: string, revision: string, applicationConfig: Uint8Array | string, + applicationConfigFilename: string, } } diff --git a/web/model/deployment_source_pb.js b/web/model/deployment_source_pb.js index 5890613f7a..6a45a08fb9 100644 --- a/web/model/deployment_source_pb.js +++ b/web/model/deployment_source_pb.js @@ -77,7 +77,8 @@ proto.model.DeploymentSource.toObject = function(includeInstance, msg) { var f, obj = { applicationDirectory: jspb.Message.getFieldWithDefault(msg, 1, ""), revision: jspb.Message.getFieldWithDefault(msg, 2, ""), - applicationConfig: msg.getApplicationConfig_asB64() + applicationConfig: msg.getApplicationConfig_asB64(), + applicationConfigFilename: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -126,6 +127,10 @@ proto.model.DeploymentSource.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setApplicationConfig(value); break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setApplicationConfigFilename(value); + break; default: reader.skipField(); break; @@ -176,6 +181,13 @@ proto.model.DeploymentSource.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getApplicationConfigFilename(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } }; @@ -257,4 +269,22 @@ proto.model.DeploymentSource.prototype.setApplicationConfig = function(value) { }; +/** + * optional string application_config_filename = 4; + * @return {string} + */ +proto.model.DeploymentSource.prototype.getApplicationConfigFilename = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.model.DeploymentSource} returns this + */ +proto.model.DeploymentSource.prototype.setApplicationConfigFilename = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + goog.object.extend(exports, proto.model);