Skip to content

Commit

Permalink
add support for infisical env groups (#237)
Browse files Browse the repository at this point in the history
* add support for infisical env groups

* rename

* comment nit
  • Loading branch information
ianedwards authored Apr 19, 2024
1 parent 837ed04 commit 3310c2f
Show file tree
Hide file tree
Showing 10 changed files with 1,942 additions and 1,870 deletions.
2,749 changes: 1,387 additions & 1,362 deletions generated/go/porter/v1/cluster_control_plane.pb.go

Large diffs are not rendered by default.

247 changes: 214 additions & 33 deletions generated/go/porter/v1/env_group.pb.go

Large diffs are not rendered by default.

14 changes: 3 additions & 11 deletions generated/go/porter/v1/porterv1connect/auth_management.connect.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

637 changes: 181 additions & 456 deletions generated/go/porter/v1/porterv1connect/cluster_control_plane.connect.go

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions generated/js/src/porter/v1/cluster_control_plane_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type { AppImage, Build, Deletions, DeploymentTarget, DeploymentTargetIden
import type { Addon, PrerequisiteAddon } from "./addons_pb.js";
import type { AppEventType } from "./agent_app_event_types_pb.js";
import type { Alert } from "./prometheus_alerts_pb.js";
import type { EnumEnvGroupProviderType } from "./env_group_pb.js";
import type { EnumEnvGroupProviderType, ExternalEnvGroupProviderEnabledStatus } from "./env_group_pb.js";
import type { NotificationConfig } from "./notification_pb.js";
import type { DatastoreCredential, ManagedDatastore } from "./datastore_pb.js";
import type { AssumeRoleChainLink } from "./aws_assume_role_pb.js";
Expand Down Expand Up @@ -5346,24 +5346,34 @@ export declare class AreExternalEnvGroupProvidersEnabledResponse extends Message
/**
* enabled is a flag that indicates whether external env group providers are enabled
*
* @generated from field: bool enabled = 1;
* @generated from field: bool enabled = 1 [deprecated = true];
* @deprecated
*/
enabled: boolean;

/**
* reprovision_required is a flag that indicates whether the cluster needs to be reprovisioned to enable external env group providers
*
* @generated from field: bool reprovision_required = 2;
* @generated from field: bool reprovision_required = 2 [deprecated = true];
* @deprecated
*/
reprovisionRequired: boolean;

/**
* k8s_upgrade_required is a flag that indicates whether the cluster needs to be upgraded to enable external env group providers
*
* @generated from field: bool k8s_upgrade_required = 3;
* @generated from field: bool k8s_upgrade_required = 3 [deprecated = true];
* @deprecated
*/
k8sUpgradeRequired: boolean;

/**
* operators is the list of external env group operators that are enabled
*
* @generated from field: repeated porter.v1.ExternalEnvGroupProviderEnabledStatus operators = 4;
*/
operators: ExternalEnvGroupProviderEnabledStatus[];

constructor(data?: PartialMessage<AreExternalEnvGroupProvidersEnabledResponse>);

static readonly runtime: typeof proto3;
Expand Down
3 changes: 2 additions & 1 deletion generated/js/src/porter/v1/cluster_control_plane_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { AppImage, Build, Deletions, DeploymentTarget, DeploymentTargetIdentifie
import { Addon, PrerequisiteAddon } from "./addons_pb.js";
import { AppEventType } from "./agent_app_event_types_pb.js";
import { Alert } from "./prometheus_alerts_pb.js";
import { EnumEnvGroupProviderType } from "./env_group_pb.js";
import { EnumEnvGroupProviderType, ExternalEnvGroupProviderEnabledStatus } from "./env_group_pb.js";
import { NotificationConfig } from "./notification_pb.js";
import { DatastoreCredential, ManagedDatastore } from "./datastore_pb.js";
import { AssumeRoleChainLink } from "./aws_assume_role_pb.js";
Expand Down Expand Up @@ -1826,6 +1826,7 @@ export const AreExternalEnvGroupProvidersEnabledResponse = /*@__PURE__*/ proto3.
{ no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 2, name: "reprovision_required", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 3, name: "k8s_upgrade_required", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 4, name: "operators", kind: "message", T: ExternalEnvGroupProviderEnabledStatus, repeated: true },
],
);

Expand Down
85 changes: 85 additions & 0 deletions generated/js/src/porter/v1/env_group_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";

/**
* EnvGroupProviderType is the type of the EnvGroupProvider.
*
Expand Down Expand Up @@ -36,5 +39,87 @@ export declare enum EnumEnvGroupProviderType {
* @generated from enum value: ENUM_ENV_GROUP_PROVIDER_TYPE_DATASTORE = 3;
*/
DATASTORE = 3,

/**
* ENUM_ENV_GROUP_PROVIDER_TYPE_INFISICAL represents an env group sourced from Infisical
*
* @generated from enum value: ENUM_ENV_GROUP_PROVIDER_TYPE_INFISICAL = 4;
*/
INFISICAL = 4,
}

/**
* EnumExternalEnvGroupOperatorType is the type of external env group provider.
*
* @generated from enum porter.v1.EnumExternalEnvGroupOperatorType
*/
export declare enum EnumExternalEnvGroupOperatorType {
/**
* ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_UNSPECIFIED represents the nil value
*
* @generated from enum value: ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,

/**
* ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_EXTERNAL_SECRETS represents the external-secrets env group operator
*
* @generated from enum value: ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_EXTERNAL_SECRETS = 1;
*/
EXTERNAL_SECRETS = 1,

/**
* ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_INFISICAL represents the Infisical env group operator
*
* @generated from enum value: ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_INFISICAL = 2;
*/
INFISICAL = 2,
}

/**
* @generated from message porter.v1.ExternalEnvGroupProviderEnabledStatus
*/
export declare class ExternalEnvGroupProviderEnabledStatus extends Message<ExternalEnvGroupProviderEnabledStatus> {
/**
* operator is the type of the external env group operator
*
* @generated from field: porter.v1.EnumExternalEnvGroupOperatorType operator = 1;
*/
operator: EnumExternalEnvGroupOperatorType;

/**
* enabled is a flag that indicates whether the external env group provider is enabled
*
* @generated from field: bool enabled = 2;
*/
enabled: boolean;

/**
* reprovision_required is a flag that indicates whether the cluster needs to be reprovisioned to enable the external env group operator
*
* @generated from field: bool reprovision_required = 3;
*/
reprovisionRequired: boolean;

/**
* k8s_upgrade_required is a flag that indicates whether the cluster needs to be upgraded to enable the external env group operator
*
* @generated from field: bool k8s_upgrade_required = 4;
*/
k8sUpgradeRequired: boolean;

constructor(data?: PartialMessage<ExternalEnvGroupProviderEnabledStatus>);

static readonly runtime: typeof proto3;
static readonly typeName = "porter.v1.ExternalEnvGroupProviderEnabledStatus";
static readonly fields: FieldList;

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExternalEnvGroupProviderEnabledStatus;

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExternalEnvGroupProviderEnabledStatus;

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExternalEnvGroupProviderEnabledStatus;

static equals(a: ExternalEnvGroupProviderEnabledStatus | PlainMessage<ExternalEnvGroupProviderEnabledStatus> | undefined, b: ExternalEnvGroupProviderEnabledStatus | PlainMessage<ExternalEnvGroupProviderEnabledStatus> | undefined): boolean;
}

28 changes: 28 additions & 0 deletions generated/js/src/porter/v1/env_group_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,34 @@ export const EnumEnvGroupProviderType = /*@__PURE__*/ proto3.makeEnum(
{no: 1, name: "ENUM_ENV_GROUP_PROVIDER_TYPE_PORTER", localName: "PORTER"},
{no: 2, name: "ENUM_ENV_GROUP_PROVIDER_TYPE_DOPPLER", localName: "DOPPLER"},
{no: 3, name: "ENUM_ENV_GROUP_PROVIDER_TYPE_DATASTORE", localName: "DATASTORE"},
{no: 4, name: "ENUM_ENV_GROUP_PROVIDER_TYPE_INFISICAL", localName: "INFISICAL"},
],
);

/**
* EnumExternalEnvGroupOperatorType is the type of external env group provider.
*
* @generated from enum porter.v1.EnumExternalEnvGroupOperatorType
*/
export const EnumExternalEnvGroupOperatorType = /*@__PURE__*/ proto3.makeEnum(
"porter.v1.EnumExternalEnvGroupOperatorType",
[
{no: 0, name: "ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_UNSPECIFIED", localName: "UNSPECIFIED"},
{no: 1, name: "ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_EXTERNAL_SECRETS", localName: "EXTERNAL_SECRETS"},
{no: 2, name: "ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_INFISICAL", localName: "INFISICAL"},
],
);

/**
* @generated from message porter.v1.ExternalEnvGroupProviderEnabledStatus
*/
export const ExternalEnvGroupProviderEnabledStatus = /*@__PURE__*/ proto3.makeMessageType(
"porter.v1.ExternalEnvGroupProviderEnabledStatus",
() => [
{ no: 1, name: "operator", kind: "enum", T: proto3.getEnumType(EnumExternalEnvGroupOperatorType) },
{ no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 3, name: "reprovision_required", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 4, name: "k8s_upgrade_required", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
],
);

8 changes: 5 additions & 3 deletions porter/v1/cluster_control_plane.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1187,11 +1187,13 @@ message AreExternalEnvGroupProvidersEnabledRequest {
// AreExternalEnvGroupProvidersEnabledResponse is the response object for AreExternalEnvGroupProvidersEnabled
message AreExternalEnvGroupProvidersEnabledResponse {
// enabled is a flag that indicates whether external env group providers are enabled
bool enabled = 1;
bool enabled = 1 [deprecated = true];
// reprovision_required is a flag that indicates whether the cluster needs to be reprovisioned to enable external env group providers
bool reprovision_required = 2;
bool reprovision_required = 2 [deprecated = true];
// k8s_upgrade_required is a flag that indicates whether the cluster needs to be upgraded to enable external env group providers
bool k8s_upgrade_required = 3;
bool k8s_upgrade_required = 3 [deprecated = true];
// operators is the list of external env group operators that are enabled
repeated ExternalEnvGroupProviderEnabledStatus operators = 4;
}

// EnableExternalEnvGroupProvidersRequest is the request object for EnableExternalEnvGroupProviders
Expand Down
23 changes: 23 additions & 0 deletions porter/v1/env_group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,27 @@ enum EnumEnvGroupProviderType {
ENUM_ENV_GROUP_PROVIDER_TYPE_DOPPLER = 2;
// ENUM_ENV_GROUP_PROVIDER_TYPE_DATASTORE repesents an env group sourced from a managed datastore
ENUM_ENV_GROUP_PROVIDER_TYPE_DATASTORE = 3;
// ENUM_ENV_GROUP_PROVIDER_TYPE_INFISICAL represents an env group sourced from Infisical
ENUM_ENV_GROUP_PROVIDER_TYPE_INFISICAL = 4;
}

// EnumExternalEnvGroupOperatorType is the type of external env group provider.
enum EnumExternalEnvGroupOperatorType {
// ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_UNSPECIFIED represents the nil value
ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_UNSPECIFIED = 0;
// ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_EXTERNAL_SECRETS represents the external-secrets env group operator
ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_EXTERNAL_SECRETS = 1;
// ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_INFISICAL represents the Infisical env group operator
ENUM_EXTERNAL_ENV_GROUP_OPERATOR_TYPE_INFISICAL = 2;
}

message ExternalEnvGroupProviderEnabledStatus {
// operator is the type of the external env group operator
EnumExternalEnvGroupOperatorType operator = 1;
// enabled is a flag that indicates whether the external env group provider is enabled
bool enabled = 2;
// reprovision_required is a flag that indicates whether the cluster needs to be reprovisioned to enable the external env group operator
bool reprovision_required = 3;
// k8s_upgrade_required is a flag that indicates whether the cluster needs to be upgraded to enable the external env group operator
bool k8s_upgrade_required = 4;
}

0 comments on commit 3310c2f

Please sign in to comment.