File tree Expand file tree Collapse file tree 5 files changed +72
-1
lines changed
Expand file tree Collapse file tree 5 files changed +72
-1
lines changed Original file line number Diff line number Diff line change @@ -117,3 +117,19 @@ svs:
117117 kms :
118118 keyRingId : sv-3_participant_mock
119119 locationId : us-central1
120+ extraCustomResources :
121+ sv-1-deny-onboard-prepare-endpoint :
122+ apiVersion : security.istio.io/v1
123+ kind : AuthorizationPolicy
124+ metadata :
125+ name : deny-onboard-prepare-endpoint
126+ namespace : sv-1
127+ spec :
128+ selector :
129+ matchLabels :
130+ app : sv-app
131+ action : DENY
132+ rules :
133+ - to :
134+ - operation :
135+ paths : ["/api/sv/v0/devnet/onboard/validator/prepare"]
Original file line number Diff line number Diff line change 29282928 "provider": "",
29292929 "type": "kubernetes:core/v1:Secret"
29302930 },
2931+ {
2932+ "custom": true,
2933+ "id": "",
2934+ "inputs": {
2935+ "apiVersion": "security.istio.io/v1",
2936+ "kind": "AuthorizationPolicy",
2937+ "metadata": {
2938+ "name": "deny-onboard-prepare-endpoint",
2939+ "namespace": "sv-1"
2940+ },
2941+ "spec": {
2942+ "action": "DENY",
2943+ "rules": [
2944+ {
2945+ "to": [
2946+ {
2947+ "operation": {
2948+ "paths": [
2949+ "/api/sv/v0/devnet/onboard/validator/prepare"
2950+ ]
2951+ }
2952+ }
2953+ ]
2954+ }
2955+ ],
2956+ "selector": {
2957+ "matchLabels": {
2958+ "app": "sv-app"
2959+ }
2960+ }
2961+ }
2962+ },
2963+ "name": "sv-1-deny-onboard-prepare-endpoint",
2964+ "provider": "",
2965+ "type": "kubernetes:security.istio.io/v1:AuthorizationPolicy"
2966+ },
29312967 {
29322968 "custom": true,
29332969 "id": "",
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export const InfraConfigSchema = z.object({
5555 } ) ,
5656 } ) ,
5757 monitoring : MonitoringConfigSchema ,
58+ extraCustomResources : z . object ( { } ) . catchall ( z . any ( ) ) . default ( { } ) ,
5859} ) ;
5960
6061export type Config = z . infer < typeof InfraConfigSchema > ;
@@ -72,6 +73,7 @@ console.error(
7273
7374export const infraConfig = fullConfig . infra ;
7475export const monitoringConfig = fullConfig . monitoring ;
76+ export const extraCustomResourcesConfig = fullConfig . extraCustomResources ;
7577
7678type IpRangesDict = { [ key : string ] : IpRangesDict } | string [ ] ;
7779
Original file line number Diff line number Diff line change 1+ import * as k8s from '@pulumi/kubernetes' ;
2+
3+ export function installExtraCustomResources (
4+ extraCrs : Record < string , k8s . apiextensions . CustomResourceArgs >
5+ ) : void {
6+ Object . entries ( extraCrs ) . forEach ( ( [ name , spec ] ) => {
7+ new k8s . apiextensions . CustomResource ( name , spec ) ;
8+ } ) ;
9+ }
Original file line number Diff line number Diff line change @@ -5,7 +5,13 @@ import { config } from 'splice-pulumi-common';
55
66import { clusterIsResetPeriodically , enableAlerts } from './alertings' ;
77import { configureAuth0 } from './auth0' ;
8- import { clusterBaseDomain , clusterBasename , monitoringConfig } from './config' ;
8+ import {
9+ clusterBaseDomain ,
10+ clusterBasename ,
11+ extraCustomResourcesConfig ,
12+ monitoringConfig ,
13+ } from './config' ;
14+ import { installExtraCustomResources } from './extraCustomResources' ;
915import {
1016 getNotificationChannel ,
1117 installCloudSQLMaintenanceUpdateAlerts ,
@@ -40,6 +46,8 @@ istioMonitoring(network.ingressNs, []);
4046
4147configureStorage ( ) ;
4248
49+ installExtraCustomResources ( extraCustomResourcesConfig ) ;
50+
4351let configuredAuth0 ;
4452if ( config . envFlag ( 'CLUSTER_CONFIGURE_AUTH0' , true ) ) {
4553 configuredAuth0 = configureAuth0 ( clusterBasename , network . dnsNames ) ;
You can’t perform that action at this time.
0 commit comments