@pulumi/docker 4.6.0-alpha.1705989190 → 4.6.0-alpha.1706307670

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/docker",
3
- "version": "v4.6.0-alpha.1705989190+1d6e6387",
3
+ "version": "v4.6.0-alpha.1706307670+2298155b",
4
4
  "description": "A Pulumi package for interacting with Docker in Pulumi programs",
5
5
  "keywords": [
6
6
  "pulumi",
package/service.d.ts CHANGED
@@ -2,6 +2,11 @@ import * as pulumi from "@pulumi/pulumi";
2
2
  import * as inputs from "./types/input";
3
3
  import * as outputs from "./types/output";
4
4
  /**
5
+ * <!-- Bug: Type and Name are switched -->
6
+ * This resource manages the lifecycle of a Docker service. By default, the creation, update and delete of services are detached.
7
+ * With the Converge Config Name of the service
8
+ * - `taskSpec` (Block List, Min: 1, Max: 1) User modifiable task configuration (see below for nested schema)
9
+ *
5
10
  * ## Import
6
11
  *
7
12
  * ### Example Assuming you created a `service` as follows #!/bin/bash docker service create --name foo -p 8080:80 nginx prints th ID 4pcphbxkfn2rffhbhe6czytgi you provide the definition for the resource as follows terraform resource "docker_service" "foo" {
@@ -69,11 +74,11 @@ export declare class Service extends pulumi.CustomResource {
69
74
  */
70
75
  readonly labels: pulumi.Output<outputs.ServiceLabel[]>;
71
76
  /**
72
- * The mode of resolution to use for internal load balancing between tasks
77
+ * Scheduling mode for the service
73
78
  */
74
79
  readonly mode: pulumi.Output<outputs.ServiceMode>;
75
80
  /**
76
- * A random name for the port
81
+ * Name of the service
77
82
  */
78
83
  readonly name: pulumi.Output<string>;
79
84
  /**
@@ -118,11 +123,11 @@ export interface ServiceState {
118
123
  */
119
124
  labels?: pulumi.Input<pulumi.Input<inputs.ServiceLabel>[]>;
120
125
  /**
121
- * The mode of resolution to use for internal load balancing between tasks
126
+ * Scheduling mode for the service
122
127
  */
123
128
  mode?: pulumi.Input<inputs.ServiceMode>;
124
129
  /**
125
- * A random name for the port
130
+ * Name of the service
126
131
  */
127
132
  name?: pulumi.Input<string>;
128
133
  /**
@@ -159,11 +164,11 @@ export interface ServiceArgs {
159
164
  */
160
165
  labels?: pulumi.Input<pulumi.Input<inputs.ServiceLabel>[]>;
161
166
  /**
162
- * The mode of resolution to use for internal load balancing between tasks
167
+ * Scheduling mode for the service
163
168
  */
164
169
  mode?: pulumi.Input<inputs.ServiceMode>;
165
170
  /**
166
- * A random name for the port
171
+ * Name of the service
167
172
  */
168
173
  name?: pulumi.Input<string>;
169
174
  /**
package/service.js CHANGED
@@ -6,6 +6,11 @@ exports.Service = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
8
  /**
9
+ * <!-- Bug: Type and Name are switched -->
10
+ * This resource manages the lifecycle of a Docker service. By default, the creation, update and delete of services are detached.
11
+ * With the Converge Config Name of the service
12
+ * - `taskSpec` (Block List, Min: 1, Max: 1) User modifiable task configuration (see below for nested schema)
13
+ *
9
14
  * ## Import
10
15
  *
11
16
  * ### Example Assuming you created a `service` as follows #!/bin/bash docker service create --name foo -p 8080:80 nginx prints th ID 4pcphbxkfn2rffhbhe6czytgi you provide the definition for the resource as follows terraform resource "docker_service" "foo" {
package/service.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"service.js","sourceRoot":"","sources":["../service.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAIzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAa,OAAQ,SAAQ,MAAM,CAAC,cAAc;IAC9C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAoB,EAAE,IAAmC;QAClH,OAAO,IAAI,OAAO,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;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G,8BAA8B,CAAC"}
package/types/input.d.ts CHANGED
@@ -217,6 +217,9 @@ export interface ContainerUpload {
217
217
  * Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. Conflicts with `contentBase64` & `source`
218
218
  */
219
219
  content?: pulumi.Input<string>;
220
+ /**
221
+ * Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for larger binary content such as the result of the `base64encode` interpolation function. See here for the reason. Conflicts with `content` & `source`
222
+ */
220
223
  contentBase64?: pulumi.Input<string>;
221
224
  /**
222
225
  * If `true`, the file will be uploaded with user executable permission. Defaults to `false`.
@@ -566,603 +569,210 @@ export interface SecretLabel {
566
569
  value: pulumi.Input<string>;
567
570
  }
568
571
  export interface ServiceAuth {
569
- /**
570
- * The password
571
- */
572
572
  password?: pulumi.Input<string>;
573
- /**
574
- * The address of the server for the authentication
575
- */
576
573
  serverAddress: pulumi.Input<string>;
577
- /**
578
- * The username
579
- */
580
574
  username?: pulumi.Input<string>;
581
575
  }
582
576
  export interface ServiceConvergeConfig {
583
- /**
584
- * The interval to check if the desired state is reached `(ms|s)`. Defaults to `7s`.
585
- */
586
577
  delay?: pulumi.Input<string>;
587
- /**
588
- * The timeout of the service to reach the desired state `(s|m)`. Defaults to `3m`
589
- */
590
578
  timeout?: pulumi.Input<string>;
591
579
  }
592
580
  export interface ServiceEndpointSpec {
593
- /**
594
- * The mode of resolution to use for internal load balancing between tasks
595
- */
596
581
  mode?: pulumi.Input<string>;
597
- /**
598
- * List of exposed ports that this service is accessible on from the outside. Ports can only be provided if 'vip' resolution mode is used
599
- */
600
582
  ports?: pulumi.Input<pulumi.Input<inputs.ServiceEndpointSpecPort>[]>;
601
583
  }
602
584
  export interface ServiceEndpointSpecPort {
603
- /**
604
- * A random name for the port
605
- */
606
585
  name?: pulumi.Input<string>;
607
- /**
608
- * Rrepresents the protocol of a port: `tcp`, `udp` or `sctp`. Defaults to `tcp`.
609
- */
610
586
  protocol?: pulumi.Input<string>;
611
- /**
612
- * Represents the mode in which the port is to be published: 'ingress' or 'host'. Defaults to `ingress`.
613
- */
614
587
  publishMode?: pulumi.Input<string>;
615
- /**
616
- * The port on the swarm hosts
617
- */
618
588
  publishedPort?: pulumi.Input<number>;
619
- /**
620
- * The port inside the container
621
- */
622
589
  targetPort: pulumi.Input<number>;
623
590
  }
624
591
  export interface ServiceLabel {
625
- /**
626
- * Name of the label
627
- */
628
592
  label: pulumi.Input<string>;
629
- /**
630
- * Value of the label
631
- */
632
593
  value: pulumi.Input<string>;
633
594
  }
634
595
  export interface ServiceMode {
635
- /**
636
- * When `true`, tasks will run on every worker node. Conflicts with `replicated`
637
- */
638
596
  global?: pulumi.Input<boolean>;
639
- /**
640
- * The replicated service mode
641
- */
642
597
  replicated?: pulumi.Input<inputs.ServiceModeReplicated>;
643
598
  }
644
599
  export interface ServiceModeReplicated {
645
- /**
646
- * The amount of replicas of the service. Defaults to `1`
647
- */
648
600
  replicas?: pulumi.Input<number>;
649
601
  }
650
602
  export interface ServiceRollbackConfig {
651
- /**
652
- * Delay between task rollbacks (ns|us|ms|s|m|h). Defaults to `0s`.
653
- */
654
603
  delay?: pulumi.Input<string>;
655
- /**
656
- * Action on rollback failure: pause | continue. Defaults to `pause`.
657
- */
658
604
  failureAction?: pulumi.Input<string>;
659
- /**
660
- * Failure rate to tolerate during a rollback. Defaults to `0.0`.
661
- */
662
605
  maxFailureRatio?: pulumi.Input<string>;
663
- /**
664
- * Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
665
- */
666
606
  monitor?: pulumi.Input<string>;
667
- /**
668
- * Rollback order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
669
- */
670
607
  order?: pulumi.Input<string>;
671
- /**
672
- * Maximum number of tasks to be rollbacked in one iteration. Defaults to `1`
673
- */
674
608
  parallelism?: pulumi.Input<number>;
675
609
  }
676
610
  export interface ServiceTaskSpec {
677
- /**
678
- * The spec for each container
679
- */
680
611
  containerSpec: pulumi.Input<inputs.ServiceTaskSpecContainerSpec>;
681
- /**
682
- * A counter that triggers an update even if no relevant parameters have been changed. See the [spec](https://github.com/docker/swarmkit/blob/master/api/specs.proto#L126).
683
- */
684
612
  forceUpdate?: pulumi.Input<number>;
685
- /**
686
- * Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified
687
- */
688
613
  logDriver?: pulumi.Input<inputs.ServiceTaskSpecLogDriver>;
689
- /**
690
- * The networks the container is attached to
691
- */
692
614
  networksAdvanceds?: pulumi.Input<pulumi.Input<inputs.ServiceTaskSpecNetworksAdvanced>[]>;
693
- /**
694
- * The placement preferences
695
- */
696
615
  placement?: pulumi.Input<inputs.ServiceTaskSpecPlacement>;
697
- /**
698
- * Resource requirements which apply to each individual container created as part of the service
699
- */
700
616
  resources?: pulumi.Input<inputs.ServiceTaskSpecResources>;
701
- /**
702
- * Specification for the restart policy which applies to containers created as part of this service.
703
- */
704
617
  restartPolicy?: pulumi.Input<inputs.ServiceTaskSpecRestartPolicy>;
705
- /**
706
- * Runtime is the type of runtime specified for the task executor. See the [types](https://github.com/moby/moby/blob/master/api/types/swarm/runtime.go).
707
- */
708
618
  runtime?: pulumi.Input<string>;
709
619
  }
710
620
  export interface ServiceTaskSpecContainerSpec {
711
- /**
712
- * Arguments to the command
713
- */
714
621
  args?: pulumi.Input<pulumi.Input<string>[]>;
715
- /**
716
- * The command/entrypoint to be run in the image. According to the [docker cli](https://github.com/docker/cli/blob/v20.10.7/cli/command/service/opts.go#L705) the override of the entrypoint is also passed to the `command` property and there is no `entrypoint` attribute in the `ContainerSpec` of the service.
717
- */
718
622
  commands?: pulumi.Input<pulumi.Input<string>[]>;
719
- /**
720
- * References to zero or more configs that will be exposed to the service
721
- */
722
623
  configs?: pulumi.Input<pulumi.Input<inputs.ServiceTaskSpecContainerSpecConfig>[]>;
723
- /**
724
- * The working directory for commands to run in
725
- */
726
624
  dir?: pulumi.Input<string>;
727
- /**
728
- * Specification for DNS related configurations in resolver configuration file (`resolv.conf`)
729
- */
730
625
  dnsConfig?: pulumi.Input<inputs.ServiceTaskSpecContainerSpecDnsConfig>;
731
- /**
732
- * A list of environment variables in the form VAR="value"
733
- */
734
626
  env?: pulumi.Input<{
735
627
  [key: string]: pulumi.Input<string>;
736
628
  }>;
737
- /**
738
- * A list of additional groups that the container process will run as
739
- */
740
629
  groups?: pulumi.Input<pulumi.Input<string>[]>;
741
- /**
742
- * A test to perform to check that the container is healthy
743
- */
744
630
  healthcheck?: pulumi.Input<inputs.ServiceTaskSpecContainerSpecHealthcheck>;
745
- /**
746
- * The hostname to use for the container, as a valid RFC 1123 hostname
747
- */
748
631
  hostname?: pulumi.Input<string>;
749
- /**
750
- * A list of hostname/IP mappings to add to the container's hosts file
751
- */
752
632
  hosts?: pulumi.Input<pulumi.Input<inputs.ServiceTaskSpecContainerSpecHost>[]>;
753
- /**
754
- * The image name to use for the containers of the service, like `nginx:1.17.6`. Also use the data-source or resource of `docker.RemoteImage` with the `repoDigest` or `docker.RegistryImage` with the `name` attribute for this, as shown in the examples.
755
- */
756
633
  image: pulumi.Input<string>;
757
- /**
758
- * Isolation technology of the containers running the service. (Windows only). Defaults to `default`.
759
- */
760
634
  isolation?: pulumi.Input<string>;
761
- /**
762
- * User-defined key/value metadata
763
- */
764
635
  labels?: pulumi.Input<pulumi.Input<inputs.ServiceTaskSpecContainerSpecLabel>[]>;
765
- /**
766
- * Specification for mounts to be added to containers created as part of the service
767
- */
768
636
  mounts?: pulumi.Input<pulumi.Input<inputs.ServiceTaskSpecContainerSpecMount>[]>;
769
- /**
770
- * Security options for the container
771
- */
772
637
  privileges?: pulumi.Input<inputs.ServiceTaskSpecContainerSpecPrivileges>;
773
- /**
774
- * Whether the mount should be read-only
775
- */
776
638
  readOnly?: pulumi.Input<boolean>;
777
- /**
778
- * References to zero or more secrets that will be exposed to the service
779
- */
780
639
  secrets?: pulumi.Input<pulumi.Input<inputs.ServiceTaskSpecContainerSpecSecret>[]>;
781
- /**
782
- * Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or '0s' the destroy will not check if all tasks/containers of the service terminate.
783
- */
784
640
  stopGracePeriod?: pulumi.Input<string>;
785
- /**
786
- * Signal to stop the container
787
- */
788
641
  stopSignal?: pulumi.Input<string>;
789
- /**
790
- * Sysctls config (Linux only)
791
- */
792
642
  sysctl?: pulumi.Input<{
793
643
  [key: string]: any;
794
644
  }>;
795
- /**
796
- * SELinux user label
797
- */
798
645
  user?: pulumi.Input<string>;
799
646
  }
800
647
  export interface ServiceTaskSpecContainerSpecConfig {
801
- /**
802
- * ID of the specific config that we're referencing
803
- */
804
648
  configId: pulumi.Input<string>;
805
- /**
806
- * Name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
807
- */
808
649
  configName?: pulumi.Input<string>;
809
- /**
810
- * Represents the file GID. Defaults to `0`.
811
- */
812
650
  fileGid?: pulumi.Input<string>;
813
- /**
814
- * Represents represents the FileMode of the file. Defaults to `0o444`.
815
- */
816
651
  fileMode?: pulumi.Input<number>;
817
- /**
818
- * Represents the final filename in the filesystem
819
- */
820
652
  fileName: pulumi.Input<string>;
821
- /**
822
- * Represents the file UID. Defaults to `0`.
823
- */
824
653
  fileUid?: pulumi.Input<string>;
825
654
  }
826
655
  export interface ServiceTaskSpecContainerSpecDnsConfig {
827
- /**
828
- * The IP addresses of the name servers
829
- */
830
656
  nameservers: pulumi.Input<pulumi.Input<string>[]>;
831
- /**
832
- * A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.)
833
- */
834
657
  options?: pulumi.Input<pulumi.Input<string>[]>;
835
- /**
836
- * A search list for host-name lookup
837
- */
838
658
  searches?: pulumi.Input<pulumi.Input<string>[]>;
839
659
  }
840
660
  export interface ServiceTaskSpecContainerSpecHealthcheck {
841
- /**
842
- * Time between running the check (ms|s|m|h). Defaults to `0s`.
843
- */
844
661
  interval?: pulumi.Input<string>;
845
- /**
846
- * Consecutive failures needed to report unhealthy. Defaults to `0`
847
- */
848
662
  retries?: pulumi.Input<number>;
849
- /**
850
- * Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to `0s`.
851
- */
852
663
  startPeriod?: pulumi.Input<string>;
853
- /**
854
- * The test to perform as list
855
- */
856
664
  tests: pulumi.Input<pulumi.Input<string>[]>;
857
- /**
858
- * The timeout of the service to reach the desired state `(s|m)`. Defaults to `3m`
859
- */
860
665
  timeout?: pulumi.Input<string>;
861
666
  }
862
667
  export interface ServiceTaskSpecContainerSpecHost {
863
- /**
864
- * The name of the host
865
- */
866
668
  host: pulumi.Input<string>;
867
- /**
868
- * The ip of the host
869
- */
870
669
  ip: pulumi.Input<string>;
871
670
  }
872
671
  export interface ServiceTaskSpecContainerSpecLabel {
873
- /**
874
- * Name of the label
875
- */
876
672
  label: pulumi.Input<string>;
877
- /**
878
- * Value of the label
879
- */
880
673
  value: pulumi.Input<string>;
881
674
  }
882
675
  export interface ServiceTaskSpecContainerSpecMount {
883
- /**
884
- * Optional configuration for the bind type
885
- */
886
676
  bindOptions?: pulumi.Input<inputs.ServiceTaskSpecContainerSpecMountBindOptions>;
887
- /**
888
- * Whether the mount should be read-only
889
- */
890
677
  readOnly?: pulumi.Input<boolean>;
891
- /**
892
- * Mount source (e.g. a volume name, a host path)
893
- */
894
678
  source?: pulumi.Input<string>;
895
- /**
896
- * Container path
897
- */
898
679
  target: pulumi.Input<string>;
899
- /**
900
- * Optional configuration for the tmpfs type
901
- */
902
680
  tmpfsOptions?: pulumi.Input<inputs.ServiceTaskSpecContainerSpecMountTmpfsOptions>;
903
- /**
904
- * The mount type
905
- */
906
681
  type: pulumi.Input<string>;
907
- /**
908
- * Optional configuration for the volume type
909
- */
910
682
  volumeOptions?: pulumi.Input<inputs.ServiceTaskSpecContainerSpecMountVolumeOptions>;
911
683
  }
912
684
  export interface ServiceTaskSpecContainerSpecMountBindOptions {
913
- /**
914
- * Bind propagation refers to whether or not mounts created within a given bind-mount or named volume can be propagated to replicas of that mount. See the [docs](https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation) for details. Defaults to `rprivate`
915
- */
916
685
  propagation?: pulumi.Input<string>;
917
686
  }
918
687
  export interface ServiceTaskSpecContainerSpecMountTmpfsOptions {
919
- /**
920
- * The mode of resolution to use for internal load balancing between tasks
921
- */
922
688
  mode?: pulumi.Input<number>;
923
- /**
924
- * The size for the tmpfs mount in bytes
925
- */
926
689
  sizeBytes?: pulumi.Input<number>;
927
690
  }
928
691
  export interface ServiceTaskSpecContainerSpecMountVolumeOptions {
929
- /**
930
- * Name of the driver to use to create the volume
931
- */
932
692
  driverName?: pulumi.Input<string>;
933
- /**
934
- * key/value map of driver specific options
935
- */
936
693
  driverOptions?: pulumi.Input<{
937
694
  [key: string]: pulumi.Input<string>;
938
695
  }>;
939
- /**
940
- * User-defined key/value metadata
941
- */
942
696
  labels?: pulumi.Input<pulumi.Input<inputs.ServiceTaskSpecContainerSpecMountVolumeOptionsLabel>[]>;
943
- /**
944
- * Populate volume with data from the target
945
- */
946
697
  noCopy?: pulumi.Input<boolean>;
947
698
  }
948
699
  export interface ServiceTaskSpecContainerSpecMountVolumeOptionsLabel {
949
- /**
950
- * Name of the label
951
- */
952
700
  label: pulumi.Input<string>;
953
- /**
954
- * Value of the label
955
- */
956
701
  value: pulumi.Input<string>;
957
702
  }
958
703
  export interface ServiceTaskSpecContainerSpecPrivileges {
959
- /**
960
- * CredentialSpec for managed service account (Windows only)
961
- */
962
704
  credentialSpec?: pulumi.Input<inputs.ServiceTaskSpecContainerSpecPrivilegesCredentialSpec>;
963
- /**
964
- * SELinux labels of the container
965
- */
966
705
  seLinuxContext?: pulumi.Input<inputs.ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext>;
967
706
  }
968
707
  export interface ServiceTaskSpecContainerSpecPrivilegesCredentialSpec {
969
- /**
970
- * Load credential spec from this file
971
- */
972
708
  file?: pulumi.Input<string>;
973
- /**
974
- * Load credential spec from this value in the Windows registry
975
- */
976
709
  registry?: pulumi.Input<string>;
977
710
  }
978
711
  export interface ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext {
979
- /**
980
- * Disable SELinux
981
- */
982
712
  disable?: pulumi.Input<boolean>;
983
- /**
984
- * SELinux level label
985
- */
986
713
  level?: pulumi.Input<string>;
987
- /**
988
- * SELinux role label
989
- */
990
714
  role?: pulumi.Input<string>;
991
- /**
992
- * The mount type
993
- */
994
715
  type?: pulumi.Input<string>;
995
- /**
996
- * SELinux user label
997
- */
998
716
  user?: pulumi.Input<string>;
999
717
  }
1000
718
  export interface ServiceTaskSpecContainerSpecSecret {
1001
- /**
1002
- * Represents the file GID. Defaults to `0`.
1003
- */
1004
719
  fileGid?: pulumi.Input<string>;
1005
- /**
1006
- * Represents represents the FileMode of the file. Defaults to `0o444`.
1007
- */
1008
720
  fileMode?: pulumi.Input<number>;
1009
- /**
1010
- * Represents the final filename in the filesystem
1011
- */
1012
721
  fileName: pulumi.Input<string>;
1013
- /**
1014
- * Represents the file UID. Defaults to `0`.
1015
- */
1016
722
  fileUid?: pulumi.Input<string>;
1017
- /**
1018
- * ID of the specific secret that we're referencing
1019
- */
1020
723
  secretId: pulumi.Input<string>;
1021
- /**
1022
- * Name of the secret that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
1023
- */
1024
724
  secretName?: pulumi.Input<string>;
1025
725
  }
1026
726
  export interface ServiceTaskSpecLogDriver {
1027
- /**
1028
- * A random name for the port
1029
- */
1030
727
  name: pulumi.Input<string>;
1031
- /**
1032
- * A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.)
1033
- */
1034
728
  options?: pulumi.Input<{
1035
729
  [key: string]: pulumi.Input<string>;
1036
730
  }>;
1037
731
  }
1038
732
  export interface ServiceTaskSpecNetworksAdvanced {
1039
- /**
1040
- * The network aliases of the container in the specific network.
1041
- */
1042
733
  aliases?: pulumi.Input<pulumi.Input<string>[]>;
1043
- /**
1044
- * An array of driver options for the network, e.g. `opts1=value`
1045
- */
1046
734
  driverOpts?: pulumi.Input<pulumi.Input<string>[]>;
1047
- /**
1048
- * A random name for the port
1049
- */
1050
735
  name: pulumi.Input<string>;
1051
736
  }
1052
737
  export interface ServiceTaskSpecPlacement {
1053
- /**
1054
- * An array of constraints. e.g.: `node.role==manager`
1055
- */
1056
738
  constraints?: pulumi.Input<pulumi.Input<string>[]>;
1057
- /**
1058
- * Maximum number of replicas for per node (default value is `0`, which is unlimited)
1059
- */
1060
739
  maxReplicas?: pulumi.Input<number>;
1061
- /**
1062
- * Platforms stores all the platforms that the service's image can run on
1063
- */
1064
740
  platforms?: pulumi.Input<pulumi.Input<inputs.ServiceTaskSpecPlacementPlatform>[]>;
1065
- /**
1066
- * Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: `spread=node.role.manager`
1067
- */
1068
741
  prefs?: pulumi.Input<pulumi.Input<string>[]>;
1069
742
  }
1070
743
  export interface ServiceTaskSpecPlacementPlatform {
1071
- /**
1072
- * The architecture, e.g. `amd64`
1073
- */
1074
744
  architecture: pulumi.Input<string>;
1075
- /**
1076
- * The operation system, e.g. `linux`
1077
- */
1078
745
  os: pulumi.Input<string>;
1079
746
  }
1080
747
  export interface ServiceTaskSpecResources {
1081
- /**
1082
- * Describes the resources which can be advertised by a node and requested by a task
1083
- */
1084
748
  limits?: pulumi.Input<inputs.ServiceTaskSpecResourcesLimits>;
1085
- /**
1086
- * An object describing the resources which can be advertised by a node and requested by a task
1087
- */
1088
749
  reservation?: pulumi.Input<inputs.ServiceTaskSpecResourcesReservation>;
1089
750
  }
1090
751
  export interface ServiceTaskSpecResourcesLimits {
1091
- /**
1092
- * The amounf of memory in bytes the container allocates
1093
- */
1094
752
  memoryBytes?: pulumi.Input<number>;
1095
- /**
1096
- * CPU shares in units of `1/1e9` (or `10^-9`) of the CPU. Should be at least `1000000`
1097
- */
1098
753
  nanoCpus?: pulumi.Input<number>;
1099
754
  }
1100
755
  export interface ServiceTaskSpecResourcesReservation {
1101
- /**
1102
- * User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, GPU=UUID1)
1103
- */
1104
756
  genericResources?: pulumi.Input<inputs.ServiceTaskSpecResourcesReservationGenericResources>;
1105
- /**
1106
- * The amounf of memory in bytes the container allocates
1107
- */
1108
757
  memoryBytes?: pulumi.Input<number>;
1109
- /**
1110
- * CPU shares in units of `1/1e9` (or `10^-9`) of the CPU. Should be at least `1000000`
1111
- */
1112
758
  nanoCpus?: pulumi.Input<number>;
1113
759
  }
1114
760
  export interface ServiceTaskSpecResourcesReservationGenericResources {
1115
- /**
1116
- * The Integer resources
1117
- */
1118
761
  discreteResourcesSpecs?: pulumi.Input<pulumi.Input<string>[]>;
1119
- /**
1120
- * The String resources
1121
- */
1122
762
  namedResourcesSpecs?: pulumi.Input<pulumi.Input<string>[]>;
1123
763
  }
1124
764
  export interface ServiceTaskSpecRestartPolicy {
1125
- /**
1126
- * Condition for restart
1127
- */
1128
765
  condition?: pulumi.Input<string>;
1129
- /**
1130
- * The interval to check if the desired state is reached `(ms|s)`. Defaults to `7s`.
1131
- */
1132
766
  delay?: pulumi.Input<string>;
1133
- /**
1134
- * Maximum attempts to restart a given container before giving up (default value is `0`, which is ignored)
1135
- */
1136
767
  maxAttempts?: pulumi.Input<number>;
1137
- /**
1138
- * The time window used to evaluate the restart policy (default value is `0`, which is unbounded) (ms|s|m|h)
1139
- */
1140
768
  window?: pulumi.Input<string>;
1141
769
  }
1142
770
  export interface ServiceUpdateConfig {
1143
- /**
1144
- * Delay between task updates `(ns|us|ms|s|m|h)`. Defaults to `0s`.
1145
- */
1146
771
  delay?: pulumi.Input<string>;
1147
- /**
1148
- * Action on update failure: `pause`, `continue` or `rollback`. Defaults to `pause`.
1149
- */
1150
772
  failureAction?: pulumi.Input<string>;
1151
- /**
1152
- * Failure rate to tolerate during an update. Defaults to `0.0`.
1153
- */
1154
773
  maxFailureRatio?: pulumi.Input<string>;
1155
- /**
1156
- * Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
1157
- */
1158
774
  monitor?: pulumi.Input<string>;
1159
- /**
1160
- * Update order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
1161
- */
1162
775
  order?: pulumi.Input<string>;
1163
- /**
1164
- * Maximum number of tasks to be updated in one iteration. Defaults to `1`
1165
- */
1166
776
  parallelism?: pulumi.Input<number>;
1167
777
  }
1168
778
  export interface VolumeLabel {
package/types/output.d.ts CHANGED
@@ -206,6 +206,9 @@ export interface ContainerUpload {
206
206
  * Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. Conflicts with `contentBase64` & `source`
207
207
  */
208
208
  content?: string;
209
+ /**
210
+ * Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for larger binary content such as the result of the `base64encode` interpolation function. See here for the reason. Conflicts with `content` & `source`
211
+ */
209
212
  contentBase64?: string;
210
213
  /**
211
214
  * If `true`, the file will be uploaded with user executable permission. Defaults to `false`.
@@ -503,603 +506,210 @@ export interface SecretLabel {
503
506
  value: string;
504
507
  }
505
508
  export interface ServiceAuth {
506
- /**
507
- * The password
508
- */
509
509
  password?: string;
510
- /**
511
- * The address of the server for the authentication
512
- */
513
510
  serverAddress: string;
514
- /**
515
- * The username
516
- */
517
511
  username?: string;
518
512
  }
519
513
  export interface ServiceConvergeConfig {
520
- /**
521
- * The interval to check if the desired state is reached `(ms|s)`. Defaults to `7s`.
522
- */
523
514
  delay?: string;
524
- /**
525
- * The timeout of the service to reach the desired state `(s|m)`. Defaults to `3m`
526
- */
527
515
  timeout?: string;
528
516
  }
529
517
  export interface ServiceEndpointSpec {
530
- /**
531
- * The mode of resolution to use for internal load balancing between tasks
532
- */
533
518
  mode: string;
534
- /**
535
- * List of exposed ports that this service is accessible on from the outside. Ports can only be provided if 'vip' resolution mode is used
536
- */
537
519
  ports?: outputs.ServiceEndpointSpecPort[];
538
520
  }
539
521
  export interface ServiceEndpointSpecPort {
540
- /**
541
- * A random name for the port
542
- */
543
522
  name?: string;
544
- /**
545
- * Rrepresents the protocol of a port: `tcp`, `udp` or `sctp`. Defaults to `tcp`.
546
- */
547
523
  protocol?: string;
548
- /**
549
- * Represents the mode in which the port is to be published: 'ingress' or 'host'. Defaults to `ingress`.
550
- */
551
524
  publishMode?: string;
552
- /**
553
- * The port on the swarm hosts
554
- */
555
525
  publishedPort: number;
556
- /**
557
- * The port inside the container
558
- */
559
526
  targetPort: number;
560
527
  }
561
528
  export interface ServiceLabel {
562
- /**
563
- * Name of the label
564
- */
565
529
  label: string;
566
- /**
567
- * Value of the label
568
- */
569
530
  value: string;
570
531
  }
571
532
  export interface ServiceMode {
572
- /**
573
- * When `true`, tasks will run on every worker node. Conflicts with `replicated`
574
- */
575
533
  global?: boolean;
576
- /**
577
- * The replicated service mode
578
- */
579
534
  replicated: outputs.ServiceModeReplicated;
580
535
  }
581
536
  export interface ServiceModeReplicated {
582
- /**
583
- * The amount of replicas of the service. Defaults to `1`
584
- */
585
537
  replicas?: number;
586
538
  }
587
539
  export interface ServiceRollbackConfig {
588
- /**
589
- * Delay between task rollbacks (ns|us|ms|s|m|h). Defaults to `0s`.
590
- */
591
540
  delay?: string;
592
- /**
593
- * Action on rollback failure: pause | continue. Defaults to `pause`.
594
- */
595
541
  failureAction?: string;
596
- /**
597
- * Failure rate to tolerate during a rollback. Defaults to `0.0`.
598
- */
599
542
  maxFailureRatio?: string;
600
- /**
601
- * Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
602
- */
603
543
  monitor?: string;
604
- /**
605
- * Rollback order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
606
- */
607
544
  order?: string;
608
- /**
609
- * Maximum number of tasks to be rollbacked in one iteration. Defaults to `1`
610
- */
611
545
  parallelism?: number;
612
546
  }
613
547
  export interface ServiceTaskSpec {
614
- /**
615
- * The spec for each container
616
- */
617
548
  containerSpec: outputs.ServiceTaskSpecContainerSpec;
618
- /**
619
- * A counter that triggers an update even if no relevant parameters have been changed. See the [spec](https://github.com/docker/swarmkit/blob/master/api/specs.proto#L126).
620
- */
621
549
  forceUpdate: number;
622
- /**
623
- * Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified
624
- */
625
550
  logDriver?: outputs.ServiceTaskSpecLogDriver;
626
- /**
627
- * The networks the container is attached to
628
- */
629
551
  networksAdvanceds?: outputs.ServiceTaskSpecNetworksAdvanced[];
630
- /**
631
- * The placement preferences
632
- */
633
552
  placement: outputs.ServiceTaskSpecPlacement;
634
- /**
635
- * Resource requirements which apply to each individual container created as part of the service
636
- */
637
553
  resources: outputs.ServiceTaskSpecResources;
638
- /**
639
- * Specification for the restart policy which applies to containers created as part of this service.
640
- */
641
554
  restartPolicy: outputs.ServiceTaskSpecRestartPolicy;
642
- /**
643
- * Runtime is the type of runtime specified for the task executor. See the [types](https://github.com/moby/moby/blob/master/api/types/swarm/runtime.go).
644
- */
645
555
  runtime: string;
646
556
  }
647
557
  export interface ServiceTaskSpecContainerSpec {
648
- /**
649
- * Arguments to the command
650
- */
651
558
  args?: string[];
652
- /**
653
- * The command/entrypoint to be run in the image. According to the [docker cli](https://github.com/docker/cli/blob/v20.10.7/cli/command/service/opts.go#L705) the override of the entrypoint is also passed to the `command` property and there is no `entrypoint` attribute in the `ContainerSpec` of the service.
654
- */
655
559
  commands?: string[];
656
- /**
657
- * References to zero or more configs that will be exposed to the service
658
- */
659
560
  configs?: outputs.ServiceTaskSpecContainerSpecConfig[];
660
- /**
661
- * The working directory for commands to run in
662
- */
663
561
  dir?: string;
664
- /**
665
- * Specification for DNS related configurations in resolver configuration file (`resolv.conf`)
666
- */
667
562
  dnsConfig: outputs.ServiceTaskSpecContainerSpecDnsConfig;
668
- /**
669
- * A list of environment variables in the form VAR="value"
670
- */
671
563
  env?: {
672
564
  [key: string]: string;
673
565
  };
674
- /**
675
- * A list of additional groups that the container process will run as
676
- */
677
566
  groups?: string[];
678
- /**
679
- * A test to perform to check that the container is healthy
680
- */
681
567
  healthcheck: outputs.ServiceTaskSpecContainerSpecHealthcheck;
682
- /**
683
- * The hostname to use for the container, as a valid RFC 1123 hostname
684
- */
685
568
  hostname?: string;
686
- /**
687
- * A list of hostname/IP mappings to add to the container's hosts file
688
- */
689
569
  hosts?: outputs.ServiceTaskSpecContainerSpecHost[];
690
- /**
691
- * The image name to use for the containers of the service, like `nginx:1.17.6`. Also use the data-source or resource of `docker.RemoteImage` with the `repoDigest` or `docker.RegistryImage` with the `name` attribute for this, as shown in the examples.
692
- */
693
570
  image: string;
694
- /**
695
- * Isolation technology of the containers running the service. (Windows only). Defaults to `default`.
696
- */
697
571
  isolation?: string;
698
- /**
699
- * User-defined key/value metadata
700
- */
701
572
  labels?: outputs.ServiceTaskSpecContainerSpecLabel[];
702
- /**
703
- * Specification for mounts to be added to containers created as part of the service
704
- */
705
573
  mounts?: outputs.ServiceTaskSpecContainerSpecMount[];
706
- /**
707
- * Security options for the container
708
- */
709
574
  privileges?: outputs.ServiceTaskSpecContainerSpecPrivileges;
710
- /**
711
- * Whether the mount should be read-only
712
- */
713
575
  readOnly?: boolean;
714
- /**
715
- * References to zero or more secrets that will be exposed to the service
716
- */
717
576
  secrets?: outputs.ServiceTaskSpecContainerSpecSecret[];
718
- /**
719
- * Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or '0s' the destroy will not check if all tasks/containers of the service terminate.
720
- */
721
577
  stopGracePeriod: string;
722
- /**
723
- * Signal to stop the container
724
- */
725
578
  stopSignal?: string;
726
- /**
727
- * Sysctls config (Linux only)
728
- */
729
579
  sysctl?: {
730
580
  [key: string]: any;
731
581
  };
732
- /**
733
- * SELinux user label
734
- */
735
582
  user?: string;
736
583
  }
737
584
  export interface ServiceTaskSpecContainerSpecConfig {
738
- /**
739
- * ID of the specific config that we're referencing
740
- */
741
585
  configId: string;
742
- /**
743
- * Name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
744
- */
745
586
  configName?: string;
746
- /**
747
- * Represents the file GID. Defaults to `0`.
748
- */
749
587
  fileGid?: string;
750
- /**
751
- * Represents represents the FileMode of the file. Defaults to `0o444`.
752
- */
753
588
  fileMode?: number;
754
- /**
755
- * Represents the final filename in the filesystem
756
- */
757
589
  fileName: string;
758
- /**
759
- * Represents the file UID. Defaults to `0`.
760
- */
761
590
  fileUid?: string;
762
591
  }
763
592
  export interface ServiceTaskSpecContainerSpecDnsConfig {
764
- /**
765
- * The IP addresses of the name servers
766
- */
767
593
  nameservers: string[];
768
- /**
769
- * A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.)
770
- */
771
594
  options?: string[];
772
- /**
773
- * A search list for host-name lookup
774
- */
775
595
  searches?: string[];
776
596
  }
777
597
  export interface ServiceTaskSpecContainerSpecHealthcheck {
778
- /**
779
- * Time between running the check (ms|s|m|h). Defaults to `0s`.
780
- */
781
598
  interval?: string;
782
- /**
783
- * Consecutive failures needed to report unhealthy. Defaults to `0`
784
- */
785
599
  retries?: number;
786
- /**
787
- * Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to `0s`.
788
- */
789
600
  startPeriod?: string;
790
- /**
791
- * The test to perform as list
792
- */
793
601
  tests: string[];
794
- /**
795
- * The timeout of the service to reach the desired state `(s|m)`. Defaults to `3m`
796
- */
797
602
  timeout?: string;
798
603
  }
799
604
  export interface ServiceTaskSpecContainerSpecHost {
800
- /**
801
- * The name of the host
802
- */
803
605
  host: string;
804
- /**
805
- * The ip of the host
806
- */
807
606
  ip: string;
808
607
  }
809
608
  export interface ServiceTaskSpecContainerSpecLabel {
810
- /**
811
- * Name of the label
812
- */
813
609
  label: string;
814
- /**
815
- * Value of the label
816
- */
817
610
  value: string;
818
611
  }
819
612
  export interface ServiceTaskSpecContainerSpecMount {
820
- /**
821
- * Optional configuration for the bind type
822
- */
823
613
  bindOptions?: outputs.ServiceTaskSpecContainerSpecMountBindOptions;
824
- /**
825
- * Whether the mount should be read-only
826
- */
827
614
  readOnly?: boolean;
828
- /**
829
- * Mount source (e.g. a volume name, a host path)
830
- */
831
615
  source?: string;
832
- /**
833
- * Container path
834
- */
835
616
  target: string;
836
- /**
837
- * Optional configuration for the tmpfs type
838
- */
839
617
  tmpfsOptions?: outputs.ServiceTaskSpecContainerSpecMountTmpfsOptions;
840
- /**
841
- * The mount type
842
- */
843
618
  type: string;
844
- /**
845
- * Optional configuration for the volume type
846
- */
847
619
  volumeOptions?: outputs.ServiceTaskSpecContainerSpecMountVolumeOptions;
848
620
  }
849
621
  export interface ServiceTaskSpecContainerSpecMountBindOptions {
850
- /**
851
- * Bind propagation refers to whether or not mounts created within a given bind-mount or named volume can be propagated to replicas of that mount. See the [docs](https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation) for details. Defaults to `rprivate`
852
- */
853
622
  propagation?: string;
854
623
  }
855
624
  export interface ServiceTaskSpecContainerSpecMountTmpfsOptions {
856
- /**
857
- * The mode of resolution to use for internal load balancing between tasks
858
- */
859
625
  mode?: number;
860
- /**
861
- * The size for the tmpfs mount in bytes
862
- */
863
626
  sizeBytes?: number;
864
627
  }
865
628
  export interface ServiceTaskSpecContainerSpecMountVolumeOptions {
866
- /**
867
- * Name of the driver to use to create the volume
868
- */
869
629
  driverName?: string;
870
- /**
871
- * key/value map of driver specific options
872
- */
873
630
  driverOptions?: {
874
631
  [key: string]: string;
875
632
  };
876
- /**
877
- * User-defined key/value metadata
878
- */
879
633
  labels?: outputs.ServiceTaskSpecContainerSpecMountVolumeOptionsLabel[];
880
- /**
881
- * Populate volume with data from the target
882
- */
883
634
  noCopy?: boolean;
884
635
  }
885
636
  export interface ServiceTaskSpecContainerSpecMountVolumeOptionsLabel {
886
- /**
887
- * Name of the label
888
- */
889
637
  label: string;
890
- /**
891
- * Value of the label
892
- */
893
638
  value: string;
894
639
  }
895
640
  export interface ServiceTaskSpecContainerSpecPrivileges {
896
- /**
897
- * CredentialSpec for managed service account (Windows only)
898
- */
899
641
  credentialSpec?: outputs.ServiceTaskSpecContainerSpecPrivilegesCredentialSpec;
900
- /**
901
- * SELinux labels of the container
902
- */
903
642
  seLinuxContext?: outputs.ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext;
904
643
  }
905
644
  export interface ServiceTaskSpecContainerSpecPrivilegesCredentialSpec {
906
- /**
907
- * Load credential spec from this file
908
- */
909
645
  file?: string;
910
- /**
911
- * Load credential spec from this value in the Windows registry
912
- */
913
646
  registry?: string;
914
647
  }
915
648
  export interface ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext {
916
- /**
917
- * Disable SELinux
918
- */
919
649
  disable?: boolean;
920
- /**
921
- * SELinux level label
922
- */
923
650
  level?: string;
924
- /**
925
- * SELinux role label
926
- */
927
651
  role?: string;
928
- /**
929
- * The mount type
930
- */
931
652
  type?: string;
932
- /**
933
- * SELinux user label
934
- */
935
653
  user?: string;
936
654
  }
937
655
  export interface ServiceTaskSpecContainerSpecSecret {
938
- /**
939
- * Represents the file GID. Defaults to `0`.
940
- */
941
656
  fileGid?: string;
942
- /**
943
- * Represents represents the FileMode of the file. Defaults to `0o444`.
944
- */
945
657
  fileMode?: number;
946
- /**
947
- * Represents the final filename in the filesystem
948
- */
949
658
  fileName: string;
950
- /**
951
- * Represents the file UID. Defaults to `0`.
952
- */
953
659
  fileUid?: string;
954
- /**
955
- * ID of the specific secret that we're referencing
956
- */
957
660
  secretId: string;
958
- /**
959
- * Name of the secret that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID
960
- */
961
661
  secretName?: string;
962
662
  }
963
663
  export interface ServiceTaskSpecLogDriver {
964
- /**
965
- * A random name for the port
966
- */
967
664
  name: string;
968
- /**
969
- * A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.)
970
- */
971
665
  options?: {
972
666
  [key: string]: string;
973
667
  };
974
668
  }
975
669
  export interface ServiceTaskSpecNetworksAdvanced {
976
- /**
977
- * The network aliases of the container in the specific network.
978
- */
979
670
  aliases?: string[];
980
- /**
981
- * An array of driver options for the network, e.g. `opts1=value`
982
- */
983
671
  driverOpts?: string[];
984
- /**
985
- * A random name for the port
986
- */
987
672
  name: string;
988
673
  }
989
674
  export interface ServiceTaskSpecPlacement {
990
- /**
991
- * An array of constraints. e.g.: `node.role==manager`
992
- */
993
675
  constraints?: string[];
994
- /**
995
- * Maximum number of replicas for per node (default value is `0`, which is unlimited)
996
- */
997
676
  maxReplicas?: number;
998
- /**
999
- * Platforms stores all the platforms that the service's image can run on
1000
- */
1001
677
  platforms?: outputs.ServiceTaskSpecPlacementPlatform[];
1002
- /**
1003
- * Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: `spread=node.role.manager`
1004
- */
1005
678
  prefs?: string[];
1006
679
  }
1007
680
  export interface ServiceTaskSpecPlacementPlatform {
1008
- /**
1009
- * The architecture, e.g. `amd64`
1010
- */
1011
681
  architecture: string;
1012
- /**
1013
- * The operation system, e.g. `linux`
1014
- */
1015
682
  os: string;
1016
683
  }
1017
684
  export interface ServiceTaskSpecResources {
1018
- /**
1019
- * Describes the resources which can be advertised by a node and requested by a task
1020
- */
1021
685
  limits?: outputs.ServiceTaskSpecResourcesLimits;
1022
- /**
1023
- * An object describing the resources which can be advertised by a node and requested by a task
1024
- */
1025
686
  reservation?: outputs.ServiceTaskSpecResourcesReservation;
1026
687
  }
1027
688
  export interface ServiceTaskSpecResourcesLimits {
1028
- /**
1029
- * The amounf of memory in bytes the container allocates
1030
- */
1031
689
  memoryBytes?: number;
1032
- /**
1033
- * CPU shares in units of `1/1e9` (or `10^-9`) of the CPU. Should be at least `1000000`
1034
- */
1035
690
  nanoCpus?: number;
1036
691
  }
1037
692
  export interface ServiceTaskSpecResourcesReservation {
1038
- /**
1039
- * User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, GPU=UUID1)
1040
- */
1041
693
  genericResources?: outputs.ServiceTaskSpecResourcesReservationGenericResources;
1042
- /**
1043
- * The amounf of memory in bytes the container allocates
1044
- */
1045
694
  memoryBytes?: number;
1046
- /**
1047
- * CPU shares in units of `1/1e9` (or `10^-9`) of the CPU. Should be at least `1000000`
1048
- */
1049
695
  nanoCpus?: number;
1050
696
  }
1051
697
  export interface ServiceTaskSpecResourcesReservationGenericResources {
1052
- /**
1053
- * The Integer resources
1054
- */
1055
698
  discreteResourcesSpecs?: string[];
1056
- /**
1057
- * The String resources
1058
- */
1059
699
  namedResourcesSpecs?: string[];
1060
700
  }
1061
701
  export interface ServiceTaskSpecRestartPolicy {
1062
- /**
1063
- * Condition for restart
1064
- */
1065
702
  condition?: string;
1066
- /**
1067
- * The interval to check if the desired state is reached `(ms|s)`. Defaults to `7s`.
1068
- */
1069
703
  delay?: string;
1070
- /**
1071
- * Maximum attempts to restart a given container before giving up (default value is `0`, which is ignored)
1072
- */
1073
704
  maxAttempts?: number;
1074
- /**
1075
- * The time window used to evaluate the restart policy (default value is `0`, which is unbounded) (ms|s|m|h)
1076
- */
1077
705
  window?: string;
1078
706
  }
1079
707
  export interface ServiceUpdateConfig {
1080
- /**
1081
- * Delay between task updates `(ns|us|ms|s|m|h)`. Defaults to `0s`.
1082
- */
1083
708
  delay?: string;
1084
- /**
1085
- * Action on update failure: `pause`, `continue` or `rollback`. Defaults to `pause`.
1086
- */
1087
709
  failureAction?: string;
1088
- /**
1089
- * Failure rate to tolerate during an update. Defaults to `0.0`.
1090
- */
1091
710
  maxFailureRatio?: string;
1092
- /**
1093
- * Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
1094
- */
1095
711
  monitor?: string;
1096
- /**
1097
- * Update order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
1098
- */
1099
712
  order?: string;
1100
- /**
1101
- * Maximum number of tasks to be updated in one iteration. Defaults to `1`
1102
- */
1103
713
  parallelism?: number;
1104
714
  }
1105
715
  export interface VolumeLabel {