From 804e2715d85071e3f3a2331b9bf2c2b3886b3899 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 30 Mar 2022 10:06:07 +0200 Subject: [PATCH 1/6] deploy: add deployment artifacts for NFS support These deployment files are heavily based on the CephFS deployment. Deploying an environment with these files work for me in minikube. This should make it possible to add e2e testing as well. Signed-off-by: Niels de Vos --- api/deploy/kubernetes/nfs/csi-config-map.go | 74 +++++++++ api/deploy/kubernetes/nfs/csi-config-map.yaml | 8 + .../kubernetes/nfs/csi-config-map_test.go | 38 +++++ deploy/Makefile | 4 + deploy/nfs/kubernetes/csi-config-map.yaml | 15 ++ .../kubernetes/csi-nfsplugin-provisioner.yaml | 123 ++++++++++++++ deploy/nfs/kubernetes/csi-nfsplugin.yaml | 155 ++++++++++++++++++ deploy/nfs/kubernetes/csi-nodeplugin-psp.yaml | 75 +++++++++ .../nfs/kubernetes/csi-nodeplugin-rbac.yaml | 27 +++ .../nfs/kubernetes/csi-provisioner-psp.yaml | 55 +++++++ .../nfs/kubernetes/csi-provisioner-rbac.yaml | 85 ++++++++++ tools/yamlgen/main.go | 5 + .../deploy/kubernetes/nfs/csi-config-map.go | 74 +++++++++ .../deploy/kubernetes/nfs/csi-config-map.yaml | 8 + 14 files changed, 746 insertions(+) create mode 100644 api/deploy/kubernetes/nfs/csi-config-map.go create mode 100644 api/deploy/kubernetes/nfs/csi-config-map.yaml create mode 100644 api/deploy/kubernetes/nfs/csi-config-map_test.go create mode 100644 deploy/nfs/kubernetes/csi-config-map.yaml create mode 100644 deploy/nfs/kubernetes/csi-nfsplugin-provisioner.yaml create mode 100644 deploy/nfs/kubernetes/csi-nfsplugin.yaml create mode 100644 deploy/nfs/kubernetes/csi-nodeplugin-psp.yaml create mode 100644 deploy/nfs/kubernetes/csi-nodeplugin-rbac.yaml create mode 100644 deploy/nfs/kubernetes/csi-provisioner-psp.yaml create mode 100644 deploy/nfs/kubernetes/csi-provisioner-rbac.yaml create mode 100644 vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.go create mode 100644 vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.yaml diff --git a/api/deploy/kubernetes/nfs/csi-config-map.go b/api/deploy/kubernetes/nfs/csi-config-map.go new file mode 100644 index 000000000..5a057518e --- /dev/null +++ b/api/deploy/kubernetes/nfs/csi-config-map.go @@ -0,0 +1,74 @@ +/* +Copyright 2022 The Ceph-CSI Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package nfs + +import ( + "bytes" + _ "embed" + "fmt" + "text/template" + + "github.com/ghodss/yaml" + v1 "k8s.io/api/core/v1" +) + +//go:embed csi-config-map.yaml +var csiConfigMap string + +type CSIConfigMapValues struct { + Name string +} + +var CSIConfigMapDefaults = CSIConfigMapValues{ + Name: "ceph-csi-config", +} + +// NewCSIConfigMap takes a name from the CSIConfigMapValues struct and relaces +// the value in the template. A ConfigMap object is returned which can be +// created in the Kubernetes cluster. +func NewCSIConfigMap(values CSIConfigMapValues) (*v1.ConfigMap, error) { + data, err := NewCSIConfigMapYAML(values) + if err != nil { + return nil, err + } + + cm := &v1.ConfigMap{} + err = yaml.Unmarshal([]byte(data), cm) + if err != nil { + return nil, fmt.Errorf("failed convert YAML to %T: %w", cm, err) + } + + return cm, nil +} + +// NewCSIConfigMapYAML takes a name from the CSIConfigMapValues struct and +// relaces the value in the template. A ConfigMap object in YAML is returned +// which can be created in the Kubernetes cluster. +func NewCSIConfigMapYAML(values CSIConfigMapValues) (string, error) { + var buf bytes.Buffer + + tmpl, err := template.New("CSIConfigMap").Parse(csiConfigMap) + if err != nil { + return "", fmt.Errorf("failed to parse template: %w", err) + } + err = tmpl.Execute(&buf, values) + if err != nil { + return "", fmt.Errorf("failed to replace values in template: %w", err) + } + + return buf.String(), nil +} diff --git a/api/deploy/kubernetes/nfs/csi-config-map.yaml b/api/deploy/kubernetes/nfs/csi-config-map.yaml new file mode 100644 index 000000000..c8a48eb4a --- /dev/null +++ b/api/deploy/kubernetes/nfs/csi-config-map.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ .Name }}" +data: + config.json: |- + [] diff --git a/api/deploy/kubernetes/nfs/csi-config-map_test.go b/api/deploy/kubernetes/nfs/csi-config-map_test.go new file mode 100644 index 000000000..e975b8ace --- /dev/null +++ b/api/deploy/kubernetes/nfs/csi-config-map_test.go @@ -0,0 +1,38 @@ +/* +Copyright 2022 The Ceph-CSI Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package nfs + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestNewCSIConfigMap(t *testing.T) { + cm, err := NewCSIConfigMap(CSIConfigMapDefaults) + + require.NoError(t, err) + require.NotNil(t, cm) + require.Equal(t, cm.Name, CSIConfigMapDefaults.Name) +} + +func TestNewCSIConfigMapYAML(t *testing.T) { + yaml, err := NewCSIConfigMapYAML(CSIConfigMapDefaults) + + require.NoError(t, err) + require.NotEqual(t, "", yaml) +} diff --git a/deploy/Makefile b/deploy/Makefile index e42d22c32..4758a6d5a 100644 --- a/deploy/Makefile +++ b/deploy/Makefile @@ -16,6 +16,7 @@ all: \ scc.yaml \ nfs/kubernetes/csidriver.yaml \ + nfs/kubernetes/csi-config-map.yaml \ rbd/kubernetes/csidriver.yaml \ rbd/kubernetes/csi-config-map.yaml @@ -25,6 +26,9 @@ scc.yaml: ../api/deploy/ocp/scc.yaml ../api/deploy/ocp/scc.go nfs/kubernetes/csidriver.yaml: ../api/deploy/kubernetes/nfs/csidriver.yaml ../api/deploy/kubernetes/nfs/csidriver.go $(MAKE) -C ../tools generate-deploy +nfs/kubernetes/csi-config-map.yaml: ../api/deploy/kubernetes/nfs/csi-config-map.* + $(MAKE) -C ../tools generate-deploy + rbd/kubernetes/csidriver.yaml: ../api/deploy/kubernetes/rbd/csidriver.yaml ../api/deploy/kubernetes/rbd/csidriver.go $(MAKE) -C ../tools generate-deploy diff --git a/deploy/nfs/kubernetes/csi-config-map.yaml b/deploy/nfs/kubernetes/csi-config-map.yaml new file mode 100644 index 000000000..44ef712a4 --- /dev/null +++ b/deploy/nfs/kubernetes/csi-config-map.yaml @@ -0,0 +1,15 @@ +# +# /!\ DO NOT MODIFY THIS FILE +# +# This file has been automatically generated by Ceph-CSI yamlgen. +# The source for the contents can be found in the api/deploy directory, make +# your modifications there. +# +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: "ceph-csi-config" +data: + config.json: |- + [] diff --git a/deploy/nfs/kubernetes/csi-nfsplugin-provisioner.yaml b/deploy/nfs/kubernetes/csi-nfsplugin-provisioner.yaml new file mode 100644 index 000000000..d2155690c --- /dev/null +++ b/deploy/nfs/kubernetes/csi-nfsplugin-provisioner.yaml @@ -0,0 +1,123 @@ +--- +kind: Service +apiVersion: v1 +metadata: + name: csi-nfsplugin-provisioner + labels: + app: csi-metrics +spec: + selector: + app: csi-nfsplugin-provisioner + ports: + - name: http-metrics + port: 8080 + protocol: TCP + targetPort: 8682 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csi-nfsplugin-provisioner +spec: + selector: + matchLabels: + app: csi-nfsplugin-provisioner + replicas: 3 + template: + metadata: + labels: + app: csi-nfsplugin-provisioner + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - csi-nfsplugin-provisioner + topologyKey: "kubernetes.io/hostname" + containers: + - name: csi-provisioner + image: k8s.gcr.io/sig-storage/csi-provisioner:v3.1.0 + args: + - "--csi-address=$(ADDRESS)" + - "--v=5" + - "--timeout=150s" + - "--leader-election=true" + - "--retry-interval-start=500ms" + env: + - name: ADDRESS + value: unix:///csi/csi-provisioner.sock + imagePullPolicy: "IfNotPresent" + volumeMounts: + - name: socket-dir + mountPath: /csi + - name: csi-nfsplugin + # for stable functionality replace canary with latest release version + image: quay.io/cephcsi/cephcsi:canary + args: + - "--nodeid=$(NODE_ID)" + - "--type=nfs" + - "--controllerserver=true" + - "--endpoint=$(CSI_ENDPOINT)" + - "--v=5" + - "--drivername=nfs.csi.ceph.com" + - "--pidlimit=-1" + - "--enableprofiling=false" + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: NODE_ID + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: CSI_ENDPOINT + value: unix:///csi/csi-provisioner.sock + imagePullPolicy: "IfNotPresent" + volumeMounts: + - name: socket-dir + mountPath: /csi + - name: host-sys + mountPath: /sys + - name: ceph-csi-config + mountPath: /etc/ceph-csi-config/ + - name: keys-tmp-dir + mountPath: /tmp/csi/keys + - name: liveness-prometheus + image: quay.io/cephcsi/cephcsi:canary + args: + - "--type=liveness" + - "--endpoint=$(CSI_ENDPOINT)" + - "--metricsport=8682" + - "--metricspath=/metrics" + - "--polltime=60s" + - "--timeout=3s" + env: + - name: CSI_ENDPOINT + value: unix:///csi/csi-provisioner.sock + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + volumeMounts: + - name: socket-dir + mountPath: /csi + imagePullPolicy: "IfNotPresent" + serviceAccountName: nfs-csi-provisioner + volumes: + - emptyDir: + medium: Memory + name: socket-dir + - name: host-sys + hostPath: + path: /sys + - name: ceph-csi-config + configMap: + name: ceph-csi-config + - emptyDir: + medium: Memory + name: keys-tmp-dir diff --git a/deploy/nfs/kubernetes/csi-nfsplugin.yaml b/deploy/nfs/kubernetes/csi-nfsplugin.yaml new file mode 100644 index 000000000..ae0989a2a --- /dev/null +++ b/deploy/nfs/kubernetes/csi-nfsplugin.yaml @@ -0,0 +1,155 @@ +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: csi-nfs-node +spec: + selector: + matchLabels: + app: csi-nfs-node + template: + metadata: + labels: + app: csi-nfs-node + spec: + containers: + - args: + - --csi-address=/csi/csi.sock + - --probe-timeout=3s + - --health-port=29653 + - --v=2 + image: k8s.gcr.io/sig-storage/livenessprobe:v2.5.0 + imagePullPolicy: IfNotPresent + name: liveness-probe + resources: + limits: + memory: 100Mi + requests: + cpu: 10m + memory: 20Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /csi + name: socket-dir + - args: + - --v=5 + - --csi-address=/csi/csi.sock + - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) + env: + - name: DRIVER_REG_SOCK_PATH + value: /var/lib/kubelet/plugins/nfs.csi.ceph.com/csi.sock + - name: KUBE_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.4.0 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - /csi-node-driver-registrar + - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) + - --mode=kubelet-registration-probe + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 15 + name: node-driver-registrar + resources: + limits: + memory: 100Mi + requests: + cpu: 10m + memory: 20Mi + securityContext: + privileged: true + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /csi + name: socket-dir + - mountPath: /registration + name: registration-dir + - args: + - -v=5 + - --drivername=nfs.csi.ceph.com + - --nodeid=$(NODE_ID) + - --endpoint=$(CSI_ENDPOINT) + env: + - name: NODE_ID + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: CSI_ENDPOINT + value: unix:///csi/csi.sock + image: mcr.microsoft.com/k8s/csi/nfs-csi:v3.1.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 5 + httpGet: + path: /healthz + port: healthz + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 10 + name: nfs + ports: + - containerPort: 29653 + hostPort: 29653 + name: healthz + protocol: TCP + resources: + limits: + memory: 300Mi + requests: + cpu: 10m + memory: 20Mi + securityContext: + allowPrivilegeEscalation: true + capabilities: + add: + - SYS_ADMIN + privileged: true + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /csi + name: socket-dir + - mountPath: /var/lib/kubelet/pods + mountPropagation: Bidirectional + name: pods-mount-dir + dnsPolicy: ClusterFirstWithHostNet + hostNetwork: true + nodeSelector: + kubernetes.io/os: linux + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + serviceAccountName: nfs-csi-nodeplugin + terminationGracePeriodSeconds: 30 + tolerations: + - operator: Exists + volumes: + - hostPath: + path: /var/lib/kubelet/plugins/nfs.csi.ceph.com + type: DirectoryOrCreate + name: socket-dir + - hostPath: + path: /var/lib/kubelet/pods + type: Directory + name: pods-mount-dir + - hostPath: + path: /var/lib/kubelet/plugins_registry + type: Directory + name: registration-dir + updateStrategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + type: RollingUpdate diff --git a/deploy/nfs/kubernetes/csi-nodeplugin-psp.yaml b/deploy/nfs/kubernetes/csi-nodeplugin-psp.yaml new file mode 100644 index 000000000..9444c9644 --- /dev/null +++ b/deploy/nfs/kubernetes/csi-nodeplugin-psp.yaml @@ -0,0 +1,75 @@ +--- +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: nfs-csi-nodeplugin-psp +spec: + allowPrivilegeEscalation: true + allowedCapabilities: + - 'SYS_ADMIN' + fsGroup: + rule: RunAsAny + privileged: true + hostNetwork: true + hostPID: true + runAsUser: + rule: RunAsAny + seLinux: + rule: RunAsAny + supplementalGroups: + rule: RunAsAny + volumes: + - 'configMap' + - 'emptyDir' + - 'projected' + - 'secret' + - 'hostPath' + allowedHostPaths: + - pathPrefix: '/dev' + readOnly: false + - pathPrefix: '/run/mount' + readOnly: false + - pathPrefix: '/sys' + readOnly: false + - pathPrefix: '/etc/selinux' + readOnly: true + - pathPrefix: '/lib/modules' + readOnly: true + - pathPrefix: '/var/lib/kubelet/pods' + readOnly: false + - pathPrefix: '/var/lib/kubelet/plugins/nfs.csi.ceph.com' + readOnly: false + - pathPrefix: '/var/lib/kubelet/plugins_registry' + readOnly: false + - pathPrefix: '/var/lib/kubelet/plugins' + readOnly: false + +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: nfs-csi-nodeplugin-psp + # replace with non-default namespace name + namespace: default +rules: + - apiGroups: ['policy'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: ['nfs-csi-nodeplugin-psp'] + +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: nfs-csi-nodeplugin-psp + # replace with non-default namespace name + namespace: default +subjects: + - kind: ServiceAccount + name: nfs-csi-nodeplugin + # replace with non-default namespace name + namespace: default +roleRef: + kind: Role + name: nfs-csi-nodeplugin-psp + apiGroup: rbac.authorization.k8s.io diff --git a/deploy/nfs/kubernetes/csi-nodeplugin-rbac.yaml b/deploy/nfs/kubernetes/csi-nodeplugin-rbac.yaml new file mode 100644 index 000000000..e3523faed --- /dev/null +++ b/deploy/nfs/kubernetes/csi-nodeplugin-rbac.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: nfs-csi-nodeplugin +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: nfs-csi-nodeplugin +rules: + - apiGroups: [""] + resources: ["nodes"] + verbs: ["get"] +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: nfs-csi-nodeplugin +subjects: + - kind: ServiceAccount + name: nfs-csi-nodeplugin + namespace: default +roleRef: + kind: ClusterRole + name: nfs-csi-nodeplugin + apiGroup: rbac.authorization.k8s.io diff --git a/deploy/nfs/kubernetes/csi-provisioner-psp.yaml b/deploy/nfs/kubernetes/csi-provisioner-psp.yaml new file mode 100644 index 000000000..b5115817d --- /dev/null +++ b/deploy/nfs/kubernetes/csi-provisioner-psp.yaml @@ -0,0 +1,55 @@ +--- +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: nfs-csi-provisioner-psp +spec: + fsGroup: + rule: RunAsAny + runAsUser: + rule: RunAsAny + seLinux: + rule: RunAsAny + supplementalGroups: + rule: RunAsAny + volumes: + - 'configMap' + - 'emptyDir' + - 'projected' + - 'secret' + - 'hostPath' + allowedHostPaths: + - pathPrefix: '/dev' + readOnly: false + - pathPrefix: '/sys' + readOnly: false + - pathPrefix: '/lib/modules' + readOnly: true +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: nfs-csi-provisioner-psp + # replace with non-default namespace name + namespace: default +rules: + - apiGroups: ['policy'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: ['nfs-csi-provisioner-psp'] +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: nfs-csi-provisioner-psp + # replace with non-default namespace name + namespace: default +subjects: + - kind: ServiceAccount + name: nfs-csi-provisioner + # replace with non-default namespace name + namespace: default +roleRef: + kind: Role + name: nfs-csi-provisioner-psp + apiGroup: rbac.authorization.k8s.io diff --git a/deploy/nfs/kubernetes/csi-provisioner-rbac.yaml b/deploy/nfs/kubernetes/csi-provisioner-rbac.yaml new file mode 100644 index 000000000..b17132499 --- /dev/null +++ b/deploy/nfs/kubernetes/csi-provisioner-rbac.yaml @@ -0,0 +1,85 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: nfs-csi-provisioner +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: nfs-external-provisioner-runner +rules: + - apiGroups: [""] + resources: ["nodes"] + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["secrets"] + verbs: ["get", "list"] + - apiGroups: [""] + resources: ["events"] + verbs: ["list", "watch", "create", "update", "patch"] + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list", "watch", "create", "delete", "patch"] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["get", "list", "watch", "update"] + - apiGroups: ["storage.k8s.io"] + resources: ["storageclasses"] + verbs: ["get", "list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: ["volumeattachments"] + verbs: ["get", "list", "watch", "update", "patch"] + - apiGroups: ["storage.k8s.io"] + resources: ["volumeattachments/status"] + verbs: ["patch"] + - apiGroups: [""] + resources: ["persistentvolumeclaims/status"] + verbs: ["update", "patch"] + - apiGroups: ["storage.k8s.io"] + resources: ["csinodes"] + verbs: ["get", "list", "watch"] +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: nfs-csi-provisioner-role +subjects: + - kind: ServiceAccount + name: nfs-csi-provisioner + namespace: default +roleRef: + kind: ClusterRole + name: nfs-external-provisioner-runner + apiGroup: rbac.authorization.k8s.io +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + # replace with non-default namespace name + namespace: default + name: nfs-external-provisioner-cfg +rules: + # remove this once we stop supporting v1.0.0 + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["get", "list", "create", "delete"] + - apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["get", "watch", "list", "delete", "update", "create"] +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: nfs-csi-provisioner-role-cfg + # replace with non-default namespace name + namespace: default +subjects: + - kind: ServiceAccount + name: nfs-csi-provisioner + # replace with non-default namespace name + namespace: default +roleRef: + kind: Role + name: nfs-external-provisioner-cfg + apiGroup: rbac.authorization.k8s.io diff --git a/tools/yamlgen/main.go b/tools/yamlgen/main.go index 2d6411e35..dd93166c3 100644 --- a/tools/yamlgen/main.go +++ b/tools/yamlgen/main.go @@ -53,6 +53,11 @@ var yamlArtifacts = []deploymentArtifact{ reflect.ValueOf(nfs.NewCSIDriverYAML), reflect.ValueOf(nfs.CSIDriverDefaults), }, + { + "../deploy/nfs/kubernetes/csi-config-map.yaml", + reflect.ValueOf(nfs.NewCSIConfigMapYAML), + reflect.ValueOf(nfs.CSIConfigMapDefaults), + }, { "../deploy/rbd/kubernetes/csidriver.yaml", reflect.ValueOf(rbd.NewCSIDriverYAML), diff --git a/vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.go b/vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.go new file mode 100644 index 000000000..5a057518e --- /dev/null +++ b/vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.go @@ -0,0 +1,74 @@ +/* +Copyright 2022 The Ceph-CSI Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package nfs + +import ( + "bytes" + _ "embed" + "fmt" + "text/template" + + "github.com/ghodss/yaml" + v1 "k8s.io/api/core/v1" +) + +//go:embed csi-config-map.yaml +var csiConfigMap string + +type CSIConfigMapValues struct { + Name string +} + +var CSIConfigMapDefaults = CSIConfigMapValues{ + Name: "ceph-csi-config", +} + +// NewCSIConfigMap takes a name from the CSIConfigMapValues struct and relaces +// the value in the template. A ConfigMap object is returned which can be +// created in the Kubernetes cluster. +func NewCSIConfigMap(values CSIConfigMapValues) (*v1.ConfigMap, error) { + data, err := NewCSIConfigMapYAML(values) + if err != nil { + return nil, err + } + + cm := &v1.ConfigMap{} + err = yaml.Unmarshal([]byte(data), cm) + if err != nil { + return nil, fmt.Errorf("failed convert YAML to %T: %w", cm, err) + } + + return cm, nil +} + +// NewCSIConfigMapYAML takes a name from the CSIConfigMapValues struct and +// relaces the value in the template. A ConfigMap object in YAML is returned +// which can be created in the Kubernetes cluster. +func NewCSIConfigMapYAML(values CSIConfigMapValues) (string, error) { + var buf bytes.Buffer + + tmpl, err := template.New("CSIConfigMap").Parse(csiConfigMap) + if err != nil { + return "", fmt.Errorf("failed to parse template: %w", err) + } + err = tmpl.Execute(&buf, values) + if err != nil { + return "", fmt.Errorf("failed to replace values in template: %w", err) + } + + return buf.String(), nil +} diff --git a/vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.yaml b/vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.yaml new file mode 100644 index 000000000..c8a48eb4a --- /dev/null +++ b/vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ .Name }}" +data: + config.json: |- + [] From d760d0ab6d3dca0c6fc2a528ba58d2b5bd0dae05 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Fri, 1 Apr 2022 19:31:31 +0530 Subject: [PATCH 2/6] rbd: check for cookie support from kernel Currently we only check if the rbd-nbd tool supports cookie feature. This change will also defend cookie addition based on kernel version Signed-off-by: Prasanna Kumar Kalever --- internal/rbd/rbd_attach.go | 50 ++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/internal/rbd/rbd_attach.go b/internal/rbd/rbd_attach.go index 7ea8a9466..1c872ba44 100644 --- a/internal/rbd/rbd_attach.go +++ b/internal/rbd/rbd_attach.go @@ -71,6 +71,25 @@ const ( var ( hasNBD = true hasNBDCookieSupport = false + + kernelCookieSupport = []util.KernelVersion{ + { + Version: 5, + PatchLevel: 14, + SubLevel: 0, + ExtraVersion: 0, + Distribution: "", + Backport: false, + }, // standard 5.14+ versions + { + Version: 4, + PatchLevel: 18, + SubLevel: 0, + ExtraVersion: 365, + Distribution: ".el8", + Backport: true, + }, // CentOS-8.x + } ) func init() { @@ -207,21 +226,42 @@ func setRbdNbdToolFeatures() { _, stderr, err = util.ExecCommand(context.TODO(), "modprobe", moduleNbd) if err != nil { hasNBD = false - log.WarningLogMsg("rbd-nbd: nbd modprobe failed (%v): %q", err, stderr) + log.WarningLogMsg("nbd modprobe failed (%v): %q", err, stderr) + + return } } + log.DefaultLog("nbd module loaded") + // fetch the current running kernel info + release, err := util.GetKernelVersion() + if err != nil { + log.WarningLogMsg("fetching current kernel version failed (%v)", err) + + return + } + if !util.CheckKernelSupport(release, kernelCookieSupport) { + log.WarningLogMsg("kernel version %q doesn't support cookie feature", release) + + return + } + log.DefaultLog("kernel version %q supports cookie feature", release) + + // check if the rbd-nbd tool supports cookie stdout, stderr, err := util.ExecCommand(context.TODO(), rbdTonbd, "--help") if err != nil || stderr != "" { hasNBD = false log.WarningLogMsg("running rbd-nbd --help failed with error:%v, stderr:%s", err, stderr) - } - if strings.Contains(stdout, "--cookie") { - hasNBDCookieSupport = true + return } + if !strings.Contains(stdout, "--cookie") { + log.WarningLogMsg("rbd-nbd tool doesn't support cookie feature") - log.DefaultLog("NBD module loaded: %t, rbd-nbd supported features, cookie: %t", hasNBD, hasNBDCookieSupport) + return + } + hasNBDCookieSupport = true + log.DefaultLog("rbd-nbd tool supports cookie feature") } // parseMapOptions helps parse formatted mapOptions and unmapOptions and From 682840476fd531f9150a1f86194ec710a00f37fe Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 4 Apr 2022 11:39:38 +0200 Subject: [PATCH 3/6] build: ignore generated go-tags file The `scripts/golangci.yml.buildtags.in` file is generated from the `Makefile`, there is no need to include it in the repository. By adding the file to the `.gitignore` list, the output of `git status` will not show the file anymore. Fixes: 8fb5739f2 "build: more flexible handling of go build tags; added ceph_preview" Signed-off-by: Niels de Vos --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 11ad010a8..a1bad3c1b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ deploy/cephcsi/image/cephcsi # generated golangci-lint configuration scripts/golangci.yml +scripts/golangci.yml.buildtags.in From 32ecbdeb71c14f330a2ed96336cb16405d06f5e9 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Mon, 4 Apr 2022 15:11:39 +0530 Subject: [PATCH 4/6] doc: update documentation for release 3.6.0 This commit add upgrade documentation for release 3.6.0 and also update support matrix for v3.6.0. Signed-off-by: Humble Chirammal --- README.md | 6 ++++-- docs/ceph-csi-upgrade.md | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d3ddc28c0..389d35e15 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ environments. | Ceph CSI Version | Container Orchestrator Name | Version Tested| | -----------------| --------------------------- | --------------| +| v3.6.0 | Kubernetes | v1.21, v1.22, v1.23| | v3.5.1 | Kubernetes | v1.21, v1.22, v1.23| | v3.5.0 | Kubernetes | v1.21, v1.22, v1.23| | v3.4.0 | Kubernetes | v1.20, v1.21, v1.22| @@ -66,8 +67,8 @@ NOTE: The supported window of Ceph CSI versions is known as "N.(x-1)": (N (Latest major release) . (x (Latest minor release) - 1)). -For example, if Ceph CSI latest major version is `3.5.0` today, support is -provided for the versions above `3.4.0`. If users are running an unsupported +For example, if Ceph CSI latest major version is `3.6.0` today, support is +provided for the versions above `3.5.0`. If users are running an unsupported Ceph CSI version, they will be asked to upgrade when requesting support for the cluster. @@ -124,6 +125,7 @@ in the Kubernetes documentation. | Ceph CSI Release/Branch | Container image name | Image Tag | | ----------------------- | ---------------------------- | --------- | | devel (Branch) | quay.io/cephcsi/cephcsi | canary | +| v3.6.0 (Release) | quay.io/cephcsi/cephcsi | v3.6.0 | | v3.5.1 (Release) | quay.io/cephcsi/cephcsi | v3.5.1 | | v3.5.0 (Release) | quay.io/cephcsi/cephcsi | v3.5.0 | | v3.4.0 (Release) | quay.io/cephcsi/cephcsi | v3.4.0 | diff --git a/docs/ceph-csi-upgrade.md b/docs/ceph-csi-upgrade.md index ff4319287..b12fd3a4a 100644 --- a/docs/ceph-csi-upgrade.md +++ b/docs/ceph-csi-upgrade.md @@ -7,6 +7,7 @@ - [Upgrading from v3.2 to v3.3](#upgrading-from-v32-to-v33) - [Upgrading from v3.3 to v3.4](#upgrading-from-v33-to-v34) - [Upgrading from v3.4 to v3.5](#upgrading-from-v34-to-v35) + - [Upgrading from v3.5 to v3.6](#upgrading-from-v35-to-v36) - [Upgrading CephFS](#upgrading-cephfs) - [1. Upgrade CephFS Provisioner resources](#1-upgrade-cephfs-provisioner-resources) - [1.1 Update the CephFS Provisioner RBAC](#11-update-the-cephfs-provisioner-rbac) @@ -73,6 +74,11 @@ to upgrade from cephcsi v3.3 to v3.4 ## Upgrading from v3.4 to v3.5 +Refer [upgrade-from-v3.4-v3.5](https://github.com/ceph/ceph-csi/blob/v3.5.1/docs/ceph-csi-upgrade.md) +to upgrade from cephcsi v3.4 to v3.5 + +## Upgrading from v3.5 to v3.6 + **Ceph-csi releases from devel are expressly unsupported.** It is strongly recommended that you use [official releases](https://github.com/ceph/ceph-csi/releases) of Ceph-csi. Unreleased @@ -81,15 +87,15 @@ that will not be supported in the official releases. Builds from the devel branch can have functionality changed and even removed at any time without compatibility support and without prior notice. -**Also, we do not recommend any direct upgrades to 3.5 except from 3.4 to 3.5.** -For example, upgrading from 3.3 to 3.5 is not recommended. +**Also, we do not recommend any direct upgrades to 3.6 except from 3.5 to 3.6.** +For example, upgrading from 3.4 to 3.6 is not recommended. -git checkout v3.5.1 tag +git checkout v3.6.0 tag ```bash git clone https://github.com/ceph/ceph-csi.git cd ./ceph-csi -git checkout v3.5.1 +git checkout v3.6.0 ``` ```console @@ -214,7 +220,7 @@ For each node: - The pod deletion causes the pods to be restarted and updated automatically on the node. -we have successfully upgraded cephfs csi from v3.4 to v3.5 +we have successfully upgraded cephfs csi from v3.5 to v3.6 ### Upgrading RBD @@ -280,7 +286,7 @@ daemonset.apps/csi-rbdplugin configured service/csi-metrics-rbdplugin configured ``` -we have successfully upgraded RBD csi from v3.4 to v3.5 +we have successfully upgraded RBD csi from v3.5 to v3.6 ### CSI Sidecar containers consideration From bd3db134b9c357b64e4b2270d879710ac7eadc5f Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Mon, 7 Mar 2022 18:00:41 +0530 Subject: [PATCH 5/6] build: consume quincy release of Ceph This promotes the ceph release to Quincy Signed-off-by: Humble Chirammal --- build.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.env b/build.env index 66ce0cf6b..fb26cad81 100644 --- a/build.env +++ b/build.env @@ -12,8 +12,8 @@ CSI_IMAGE_VERSION=canary # Ceph version to use -BASE_IMAGE=quay.io/ceph/ceph:v16 -CEPH_VERSION=pacific +BASE_IMAGE=quay.io/ceph/ceph:v17 +CEPH_VERSION=quincy # standard Golang options GOLANG_VERSION=1.17.5 From 6ba740edc32c4bd8bcfe587e4b1f8883ab2aaec0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Apr 2022 07:56:10 +0000 Subject: [PATCH 6/6] rebase: bump github.com/aws/aws-sdk-go from 1.43.22 to 1.43.32 Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.43.22 to 1.43.32. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.43.22...v1.43.32) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 286 +++++++++ .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/ec2/api.go | 593 +++++++++++++++++- vendor/modules.txt | 2 +- 6 files changed, 876 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index af7eaf6bc..0b6a4779b 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/IBM/keyprotect-go-client v0.7.0 - github.com/aws/aws-sdk-go v1.43.22 + github.com/aws/aws-sdk-go v1.43.32 github.com/aws/aws-sdk-go-v2/service/sts v1.16.0 github.com/ceph/ceph-csi/api v0.0.0-00010101000000-000000000000 github.com/ceph/go-ceph v0.14.0 diff --git a/go.sum b/go.sum index ac38c1d11..565ff6f73 100644 --- a/go.sum +++ b/go.sum @@ -138,8 +138,8 @@ github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi github.com/aws/aws-sdk-go v1.25.41/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.35.24/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= github.com/aws/aws-sdk-go v1.38.49/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.43.22 h1:QY9/1TZB73UDEVQ68sUVJXf/7QUiHZl7zbbLF1wpqlc= -github.com/aws/aws-sdk-go v1.43.22/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.43.32 h1:b2NQnfWfImfo7yzXq6gzXEC+6s5v1t2RU3G9o+VirYo= +github.com/aws/aws-sdk-go v1.43.32/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.15.0 h1:f9kWLNfyCzCB43eupDAk3/XgJ2EpgktiySD6leqs0js= github.com/aws/aws-sdk-go-v2 v1.15.0/go.mod h1:lJYcuZZEHWNIb6ugJjbQY1fykdoobWbOS7kJYb4APoI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.6 h1:xiGjGVQsem2cxoIX61uRGy+Jux2s9C/kKbTrWLdrU54= diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index f70c832b1..e3208828b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -2374,6 +2374,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, @@ -5222,6 +5225,147 @@ var awsPartition = partition{ }: endpoint{}, }, }, + "data-ats.iot": service{ + Defaults: endpointDefaults{ + defaultKey{}: endpoint{ + Protocols: []string{"https"}, + CredentialScope: credentialScope{ + Service: "iotdata", + }, + }, + }, + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "ap-east-1", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-1", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-2", + }: endpoint{}, + endpointKey{ + Region: "ap-south-1", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-1", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-2", + }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "data.iot-fips.ca-central-1.amazonaws.com", + }, + endpointKey{ + Region: "eu-central-1", + }: endpoint{}, + endpointKey{ + Region: "eu-north-1", + }: endpoint{}, + endpointKey{ + Region: "eu-west-1", + }: endpoint{}, + endpointKey{ + Region: "eu-west-2", + }: endpoint{}, + endpointKey{ + Region: "eu-west-3", + }: endpoint{}, + endpointKey{ + Region: "fips-ca-central-1", + }: endpoint{ + Hostname: "data.iot-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Service: "iotdata", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-east-1", + }: endpoint{ + Hostname: "data.iot-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Service: "iotdata", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-east-2", + }: endpoint{ + Hostname: "data.iot-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Service: "iotdata", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-west-1", + }: endpoint{ + Hostname: "data.iot-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Service: "iotdata", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-west-2", + }: endpoint{ + Hostname: "data.iot-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Service: "iotdata", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "me-south-1", + }: endpoint{}, + endpointKey{ + Region: "sa-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "data.iot-fips.us-east-1.amazonaws.com", + }, + endpointKey{ + Region: "us-east-2", + }: endpoint{}, + endpointKey{ + Region: "us-east-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "data.iot-fips.us-east-2.amazonaws.com", + }, + endpointKey{ + Region: "us-west-1", + }: endpoint{}, + endpointKey{ + Region: "us-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "data.iot-fips.us-west-1.amazonaws.com", + }, + endpointKey{ + Region: "us-west-2", + }: endpoint{}, + endpointKey{ + Region: "us-west-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "data.iot-fips.us-west-2.amazonaws.com", + }, + }, + }, "data.jobs.iot": service{ Endpoints: serviceEndpoints{ endpointKey{ @@ -6481,6 +6625,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-3", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -9563,6 +9710,13 @@ var awsPartition = partition{ }: endpoint{}, }, }, + "gamesparks": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "us-east-1", + }: endpoint{}, + }, + }, "glacier": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ @@ -15112,9 +15266,15 @@ var awsPartition = partition{ }, "profile": service{ Endpoints: serviceEndpoints{ + endpointKey{ + Region: "af-south-1", + }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, + endpointKey{ + Region: "ap-northeast-2", + }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, @@ -18680,6 +18840,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-3", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -22411,6 +22574,16 @@ var awscnPartition = partition{ }, }, }, + "cloudcontrolapi": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "cn-north-1", + }: endpoint{}, + endpointKey{ + Region: "cn-northwest-1", + }: endpoint{}, + }, + }, "cloudformation": service{ Endpoints: serviceEndpoints{ endpointKey{ @@ -22530,6 +22703,24 @@ var awscnPartition = partition{ }: endpoint{}, }, }, + "data-ats.iot": service{ + Defaults: endpointDefaults{ + defaultKey{}: endpoint{ + Protocols: []string{"https"}, + CredentialScope: credentialScope{ + Service: "iotdata", + }, + }, + }, + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "cn-north-1", + }: endpoint{}, + endpointKey{ + Region: "cn-northwest-1", + }: endpoint{}, + }, + }, "data.jobs.iot": service{ Endpoints: serviceEndpoints{ endpointKey{ @@ -24783,6 +24974,54 @@ var awsusgovPartition = partition{ }: endpoint{}, }, }, + "data-ats.iot": service{ + Defaults: endpointDefaults{ + defaultKey{}: endpoint{ + Protocols: []string{"https"}, + CredentialScope: credentialScope{ + Service: "iotdata", + }, + }, + }, + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "fips-us-gov-east-1", + }: endpoint{ + Hostname: "data.iot-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Service: "iotdata", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-gov-west-1", + }: endpoint{ + Hostname: "data.iot-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Service: "iotdata", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "us-gov-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-gov-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "data.iot-fips.us-gov-east-1.amazonaws.com", + }, + endpointKey{ + Region: "us-gov-west-1", + }: endpoint{}, + endpointKey{ + Region: "us-gov-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "data.iot-fips.us-gov-west-1.amazonaws.com", + }, + }, + }, "data.jobs.iot": service{ Endpoints: serviceEndpoints{ endpointKey{ @@ -26425,6 +26664,46 @@ var awsusgovPartition = partition{ }, }, }, + "meetings-chime": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "us-gov-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-gov-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "meetings-chime-fips.us-gov-east-1.amazonaws.com", + }, + endpointKey{ + Region: "us-gov-east-1-fips", + }: endpoint{ + Hostname: "meetings-chime-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "us-gov-west-1", + }: endpoint{}, + endpointKey{ + Region: "us-gov-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "meetings-chime-fips.us-gov-west-1.amazonaws.com", + }, + endpointKey{ + Region: "us-gov-west-1-fips", + }: endpoint{ + Hostname: "meetings-chime-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: boxedTrue, + }, + }, + }, "metering.marketplace": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ @@ -29116,6 +29395,13 @@ var awsisoPartition = partition{ }: endpoint{}, }, }, + "tagging": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "us-iso-east-1", + }: endpoint{}, + }, + }, "transcribe": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 79277614e..2b141994c 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.43.22" +const SDKVersion = "1.43.32" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 3ab928799..e2df85864 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -40205,6 +40205,83 @@ func (c *EC2) ModifyInstanceEventWindowWithContext(ctx aws.Context, input *Modif return out, req.Send() } +const opModifyInstanceMaintenanceOptions = "ModifyInstanceMaintenanceOptions" + +// ModifyInstanceMaintenanceOptionsRequest generates a "aws/request.Request" representing the +// client's request for the ModifyInstanceMaintenanceOptions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyInstanceMaintenanceOptions for more information on using the ModifyInstanceMaintenanceOptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyInstanceMaintenanceOptionsRequest method. +// req, resp := client.ModifyInstanceMaintenanceOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceMaintenanceOptions +func (c *EC2) ModifyInstanceMaintenanceOptionsRequest(input *ModifyInstanceMaintenanceOptionsInput) (req *request.Request, output *ModifyInstanceMaintenanceOptionsOutput) { + op := &request.Operation{ + Name: opModifyInstanceMaintenanceOptions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyInstanceMaintenanceOptionsInput{} + } + + output = &ModifyInstanceMaintenanceOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyInstanceMaintenanceOptions API operation for Amazon Elastic Compute Cloud. +// +// Modifies the recovery behavior of your instance to disable simplified automatic +// recovery or set the recovery behavior to default. The default configuration +// will not enable simplified automatic recovery for an unsupported instance +// type. For more information, see Simplified automatic recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyInstanceMaintenanceOptions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceMaintenanceOptions +func (c *EC2) ModifyInstanceMaintenanceOptions(input *ModifyInstanceMaintenanceOptionsInput) (*ModifyInstanceMaintenanceOptionsOutput, error) { + req, out := c.ModifyInstanceMaintenanceOptionsRequest(input) + return out, req.Send() +} + +// ModifyInstanceMaintenanceOptionsWithContext is the same as ModifyInstanceMaintenanceOptions with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyInstanceMaintenanceOptions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ModifyInstanceMaintenanceOptionsWithContext(ctx aws.Context, input *ModifyInstanceMaintenanceOptionsInput, opts ...request.Option) (*ModifyInstanceMaintenanceOptionsOutput, error) { + req, out := c.ModifyInstanceMaintenanceOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyInstanceMetadataOptions = "ModifyInstanceMetadataOptions" // ModifyInstanceMetadataOptionsRequest generates a "aws/request.Request" representing the @@ -49747,6 +49824,47 @@ func (s *AddPrefixListEntry) SetDescription(v string) *AddPrefixListEntry { return s } +// Describes an additional detail for a path analysis. +type AdditionalDetail struct { + _ struct{} `type:"structure"` + + // The information type. + AdditionalDetailType *string `locationName:"additionalDetailType" type:"string"` + + // The path component. + Component *AnalysisComponent `locationName:"component" type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AdditionalDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AdditionalDetail) GoString() string { + return s.String() +} + +// SetAdditionalDetailType sets the AdditionalDetailType field's value. +func (s *AdditionalDetail) SetAdditionalDetailType(v string) *AdditionalDetail { + s.AdditionalDetailType = &v + return s +} + +// SetComponent sets the Component field's value. +func (s *AdditionalDetail) SetComponent(v *AnalysisComponent) *AdditionalDetail { + s.Component = v + return s +} + // Describes an Elastic IP address, or a carrier IP address. type Address struct { _ struct{} `type:"structure"` @@ -50993,7 +51111,7 @@ type AnalysisRouteTableRoute struct { // The ID of a network interface. NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - // Describes how the route was created. The following are possible values: + // Describes how the route was created. The following are the possible values: // // * CreateRouteTable - The route was automatically created when the route // table was created. @@ -51095,7 +51213,7 @@ type AnalysisSecurityGroupRule struct { // The IPv4 address range, in CIDR notation. Cidr *string `locationName:"cidr" type:"string"` - // The direction. The following are possible values: + // The direction. The following are the possible values: // // * egress // @@ -87271,7 +87389,7 @@ type DescribeNetworkInsightsAnalysesInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The filters. The following are possible values: + // The filters. The following are the possible values: // // * PathFound - A Boolean value that indicates whether a feasible path is // found. @@ -87423,7 +87541,7 @@ type DescribeNetworkInsightsPathsInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The filters. The following are possible values: + // The filters. The following are the possible values: // // * Destination - The ID of the resource. // @@ -101980,7 +102098,7 @@ type Explanation struct { // The destination VPC. DestinationVpc *AnalysisComponent `locationName:"destinationVpc" type:"structure"` - // The direction. The following are possible values: + // The direction. The following are the possible values: // // * egress // @@ -102068,6 +102186,18 @@ type Explanation struct { // The route table for the subnet. SubnetRouteTable *AnalysisComponent `locationName:"subnetRouteTable" type:"structure"` + // The transit gateway. + TransitGateway *AnalysisComponent `locationName:"transitGateway" type:"structure"` + + // The transit gateway attachment. + TransitGatewayAttachment *AnalysisComponent `locationName:"transitGatewayAttachment" type:"structure"` + + // The transit gateway route table. + TransitGatewayRouteTable *AnalysisComponent `locationName:"transitGatewayRouteTable" type:"structure"` + + // The transit gateway route table route. + TransitGatewayRouteTableRoute *TransitGatewayRouteTableRoute `locationName:"transitGatewayRouteTableRoute" type:"structure"` + // The component VPC. Vpc *AnalysisComponent `locationName:"vpc" type:"structure"` @@ -102342,6 +102472,30 @@ func (s *Explanation) SetSubnetRouteTable(v *AnalysisComponent) *Explanation { return s } +// SetTransitGateway sets the TransitGateway field's value. +func (s *Explanation) SetTransitGateway(v *AnalysisComponent) *Explanation { + s.TransitGateway = v + return s +} + +// SetTransitGatewayAttachment sets the TransitGatewayAttachment field's value. +func (s *Explanation) SetTransitGatewayAttachment(v *AnalysisComponent) *Explanation { + s.TransitGatewayAttachment = v + return s +} + +// SetTransitGatewayRouteTable sets the TransitGatewayRouteTable field's value. +func (s *Explanation) SetTransitGatewayRouteTable(v *AnalysisComponent) *Explanation { + s.TransitGatewayRouteTable = v + return s +} + +// SetTransitGatewayRouteTableRoute sets the TransitGatewayRouteTableRoute field's value. +func (s *Explanation) SetTransitGatewayRouteTableRoute(v *TransitGatewayRouteTableRoute) *Explanation { + s.TransitGatewayRouteTableRoute = v + return s +} + // SetVpc sets the Vpc field's value. func (s *Explanation) SetVpc(v *AnalysisComponent) *Explanation { s.Vpc = v @@ -113298,6 +113452,9 @@ type Instance struct { // The license configurations for the instance. Licenses []*LicenseConfiguration `locationName:"licenseSet" locationNameList:"item" type:"list"` + // Provides information on the recovery and maintenance options of your instance. + MaintenanceOptions *InstanceMaintenanceOptions `locationName:"maintenanceOptions" type:"structure"` + // The metadata options for the instance. MetadataOptions *InstanceMetadataOptionsResponse `locationName:"metadataOptions" type:"structure"` @@ -113573,6 +113730,12 @@ func (s *Instance) SetLicenses(v []*LicenseConfiguration) *Instance { return s } +// SetMaintenanceOptions sets the MaintenanceOptions field's value. +func (s *Instance) SetMaintenanceOptions(v *InstanceMaintenanceOptions) *Instance { + s.MaintenanceOptions = v + return s +} + // SetMetadataOptions sets the MetadataOptions field's value. func (s *Instance) SetMetadataOptions(v *InstanceMetadataOptionsResponse) *Instance { s.MetadataOptions = v @@ -114643,6 +114806,71 @@ func (s *InstanceIpv6Prefix) SetIpv6Prefix(v string) *InstanceIpv6Prefix { return s } +// The maintenance options for the instance. +type InstanceMaintenanceOptions struct { + _ struct{} `type:"structure"` + + // Provides information on the current automatic recovery behavior of your instance. + AutoRecovery *string `locationName:"autoRecovery" type:"string" enum:"InstanceAutoRecoveryState"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InstanceMaintenanceOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InstanceMaintenanceOptions) GoString() string { + return s.String() +} + +// SetAutoRecovery sets the AutoRecovery field's value. +func (s *InstanceMaintenanceOptions) SetAutoRecovery(v string) *InstanceMaintenanceOptions { + s.AutoRecovery = &v + return s +} + +// The maintenance options for the instance. +type InstanceMaintenanceOptionsRequest struct { + _ struct{} `type:"structure"` + + // Disables the automatic recovery behavior of your instance or sets it to default. + // For more information, see Simplified automatic recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery). + AutoRecovery *string `type:"string" enum:"InstanceAutoRecoveryState"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InstanceMaintenanceOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InstanceMaintenanceOptionsRequest) GoString() string { + return s.String() +} + +// SetAutoRecovery sets the AutoRecovery field's value. +func (s *InstanceMaintenanceOptionsRequest) SetAutoRecovery(v string) *InstanceMaintenanceOptionsRequest { + s.AutoRecovery = &v + return s +} + // Describes the market (purchasing) option for the instances. type InstanceMarketOptionsRequest struct { _ struct{} `type:"structure"` @@ -120579,6 +120807,71 @@ func (s *LaunchTemplateIamInstanceProfileSpecificationRequest) SetName(v string) return s } +// The maintenance options of your instance. +type LaunchTemplateInstanceMaintenanceOptions struct { + _ struct{} `type:"structure"` + + // Disables the automatic recovery behavior of your instance or sets it to default. + AutoRecovery *string `locationName:"autoRecovery" type:"string" enum:"LaunchTemplateAutoRecoveryState"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s LaunchTemplateInstanceMaintenanceOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s LaunchTemplateInstanceMaintenanceOptions) GoString() string { + return s.String() +} + +// SetAutoRecovery sets the AutoRecovery field's value. +func (s *LaunchTemplateInstanceMaintenanceOptions) SetAutoRecovery(v string) *LaunchTemplateInstanceMaintenanceOptions { + s.AutoRecovery = &v + return s +} + +// The maintenance options of your instance. +type LaunchTemplateInstanceMaintenanceOptionsRequest struct { + _ struct{} `type:"structure"` + + // Disables the automatic recovery behavior of your instance or sets it to default. + // For more information, see Simplified automatic recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery). + AutoRecovery *string `type:"string" enum:"LaunchTemplateAutoRecoveryState"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s LaunchTemplateInstanceMaintenanceOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s LaunchTemplateInstanceMaintenanceOptionsRequest) GoString() string { + return s.String() +} + +// SetAutoRecovery sets the AutoRecovery field's value. +func (s *LaunchTemplateInstanceMaintenanceOptionsRequest) SetAutoRecovery(v string) *LaunchTemplateInstanceMaintenanceOptionsRequest { + s.AutoRecovery = &v + return s +} + // The market (purchasing) option for the instances. type LaunchTemplateInstanceMarketOptions struct { _ struct{} `type:"structure"` @@ -124675,7 +124968,8 @@ func (s *ModifyFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpeci type ModifyFleetOutput struct { _ struct{} `type:"structure"` - // Is true if the request succeeds, and an error otherwise. + // If the request succeeds, the response returns true. If the request fails, + // no response is returned, and instead an error message is returned. Return *bool `locationName:"return" type:"boolean"` } @@ -126098,6 +126392,113 @@ func (s *ModifyInstanceEventWindowOutput) SetInstanceEventWindow(v *InstanceEven return s } +type ModifyInstanceMaintenanceOptionsInput struct { + _ struct{} `type:"structure"` + + // Disables the automatic recovery behavior of your instance or sets it to default. + AutoRecovery *string `type:"string" enum:"InstanceAutoRecoveryState"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the instance. + // + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModifyInstanceMaintenanceOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModifyInstanceMaintenanceOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyInstanceMaintenanceOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceMaintenanceOptionsInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoRecovery sets the AutoRecovery field's value. +func (s *ModifyInstanceMaintenanceOptionsInput) SetAutoRecovery(v string) *ModifyInstanceMaintenanceOptionsInput { + s.AutoRecovery = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyInstanceMaintenanceOptionsInput) SetDryRun(v bool) *ModifyInstanceMaintenanceOptionsInput { + s.DryRun = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *ModifyInstanceMaintenanceOptionsInput) SetInstanceId(v string) *ModifyInstanceMaintenanceOptionsInput { + s.InstanceId = &v + return s +} + +type ModifyInstanceMaintenanceOptionsOutput struct { + _ struct{} `type:"structure"` + + // Provides information on the current automatic recovery behavior of your instance. + AutoRecovery *string `locationName:"autoRecovery" type:"string" enum:"InstanceAutoRecoveryState"` + + // The ID of the instance. + InstanceId *string `locationName:"instanceId" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModifyInstanceMaintenanceOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModifyInstanceMaintenanceOptionsOutput) GoString() string { + return s.String() +} + +// SetAutoRecovery sets the AutoRecovery field's value. +func (s *ModifyInstanceMaintenanceOptionsOutput) SetAutoRecovery(v string) *ModifyInstanceMaintenanceOptionsOutput { + s.AutoRecovery = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *ModifyInstanceMaintenanceOptionsOutput) SetInstanceId(v string) *ModifyInstanceMaintenanceOptionsOutput { + s.InstanceId = &v + return s +} + type ModifyInstanceMetadataOptionsInput struct { _ struct{} `type:"structure"` @@ -128026,7 +128427,8 @@ func (s *ModifySpotFleetRequestInput) SetTargetCapacity(v int64) *ModifySpotFlee type ModifySpotFleetRequestOutput struct { _ struct{} `type:"structure"` - // Is true if the request succeeds, and an error otherwise. + // If the request succeeds, the response returns true. If the request fails, + // no response is returned, and instead an error message is returned. Return *bool `locationName:"return" type:"boolean"` } @@ -133920,6 +134322,9 @@ type PathComponent struct { // The network ACL rule. AclRule *AnalysisAclRule `locationName:"aclRule" type:"structure"` + // The additional details. + AdditionalDetails []*AdditionalDetail `locationName:"additionalDetailSet" locationNameList:"item" type:"list"` + // The resource to which the path component is attached. AttachedTo *AnalysisComponent `locationName:"attachedTo" type:"structure"` @@ -133950,6 +134355,12 @@ type PathComponent struct { // The subnet. Subnet *AnalysisComponent `locationName:"subnet" type:"structure"` + // Describes a path component. + TransitGateway *AnalysisComponent `locationName:"transitGateway" type:"structure"` + + // The route in a transit gateway route table. + TransitGatewayRouteTableRoute *TransitGatewayRouteTableRoute `locationName:"transitGatewayRouteTableRoute" type:"structure"` + // The component VPC. Vpc *AnalysisComponent `locationName:"vpc" type:"structure"` } @@ -133978,6 +134389,12 @@ func (s *PathComponent) SetAclRule(v *AnalysisAclRule) *PathComponent { return s } +// SetAdditionalDetails sets the AdditionalDetails field's value. +func (s *PathComponent) SetAdditionalDetails(v []*AdditionalDetail) *PathComponent { + s.AdditionalDetails = v + return s +} + // SetAttachedTo sets the AttachedTo field's value. func (s *PathComponent) SetAttachedTo(v *AnalysisComponent) *PathComponent { s.AttachedTo = v @@ -134038,6 +134455,18 @@ func (s *PathComponent) SetSubnet(v *AnalysisComponent) *PathComponent { return s } +// SetTransitGateway sets the TransitGateway field's value. +func (s *PathComponent) SetTransitGateway(v *AnalysisComponent) *PathComponent { + s.TransitGateway = v + return s +} + +// SetTransitGatewayRouteTableRoute sets the TransitGatewayRouteTableRoute field's value. +func (s *PathComponent) SetTransitGatewayRouteTableRoute(v *TransitGatewayRouteTableRoute) *PathComponent { + s.TransitGatewayRouteTableRoute = v + return s +} + // SetVpc sets the Vpc field's value. func (s *PathComponent) SetVpc(v *AnalysisComponent) *PathComponent { s.Vpc = v @@ -139991,6 +140420,9 @@ type RequestLaunchTemplateData struct { // The license configurations. LicenseSpecifications []*LaunchTemplateLicenseConfigurationRequest `locationName:"LicenseSpecification" locationNameList:"item" type:"list"` + // The maintenance options for the instance. + MaintenanceOptions *LaunchTemplateInstanceMaintenanceOptionsRequest `type:"structure"` + // The metadata options for the instance. For more information, see Instance // metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -140219,6 +140651,12 @@ func (s *RequestLaunchTemplateData) SetLicenseSpecifications(v []*LaunchTemplate return s } +// SetMaintenanceOptions sets the MaintenanceOptions field's value. +func (s *RequestLaunchTemplateData) SetMaintenanceOptions(v *LaunchTemplateInstanceMaintenanceOptionsRequest) *RequestLaunchTemplateData { + s.MaintenanceOptions = v + return s +} + // SetMetadataOptions sets the MetadataOptions field's value. func (s *RequestLaunchTemplateData) SetMetadataOptions(v *LaunchTemplateInstanceMetadataOptionsRequest) *RequestLaunchTemplateData { s.MetadataOptions = v @@ -142224,7 +142662,6 @@ type ResetInstanceAttributeInput struct { // The attribute to reset. // // You can only reset the following attributes: kernel | ramdisk | sourceDestCheck. - // To change an instance attribute, use ModifyInstanceAttribute. // // Attribute is a required field Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"` @@ -142694,6 +143131,9 @@ type ResponseLaunchTemplateData struct { // The license configurations. LicenseSpecifications []*LaunchTemplateLicenseConfiguration `locationName:"licenseSet" locationNameList:"item" type:"list"` + // The maintenance options for your instance. + MaintenanceOptions *LaunchTemplateInstanceMaintenanceOptions `locationName:"maintenanceOptions" type:"structure"` + // The metadata options for the instance. For more information, see Instance // metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -142859,6 +143299,12 @@ func (s *ResponseLaunchTemplateData) SetLicenseSpecifications(v []*LaunchTemplat return s } +// SetMaintenanceOptions sets the MaintenanceOptions field's value. +func (s *ResponseLaunchTemplateData) SetMaintenanceOptions(v *LaunchTemplateInstanceMaintenanceOptions) *ResponseLaunchTemplateData { + s.MaintenanceOptions = v + return s +} + // SetMetadataOptions sets the MetadataOptions field's value. func (s *ResponseLaunchTemplateData) SetMetadataOptions(v *LaunchTemplateInstanceMetadataOptions) *ResponseLaunchTemplateData { s.MetadataOptions = v @@ -144561,6 +145007,9 @@ type RunInstancesInput struct { // The license configurations. LicenseSpecifications []*LicenseConfigurationRequest `locationName:"LicenseSpecification" locationNameList:"item" type:"list"` + // The maintenance and recovery options for the instance. + MaintenanceOptions *InstanceMaintenanceOptionsRequest `type:"structure"` + // The maximum number of instances to launch. If you specify more instances // than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches // the largest possible number of instances above MinCount. @@ -144871,6 +145320,12 @@ func (s *RunInstancesInput) SetLicenseSpecifications(v []*LicenseConfigurationRe return s } +// SetMaintenanceOptions sets the MaintenanceOptions field's value. +func (s *RunInstancesInput) SetMaintenanceOptions(v *InstanceMaintenanceOptionsRequest) *RunInstancesInput { + s.MaintenanceOptions = v + return s +} + // SetMaxCount sets the MaxCount field's value. func (s *RunInstancesInput) SetMaxCount(v int64) *RunInstancesInput { s.MaxCount = &v @@ -155627,6 +156082,96 @@ func (s *TransitGatewayRouteTablePropagation) SetTransitGatewayAttachmentId(v st return s } +// Describes a route in a transit gateway route table. +type TransitGatewayRouteTableRoute struct { + _ struct{} `type:"structure"` + + // The ID of the route attachment. + AttachmentId *string `locationName:"attachmentId" type:"string"` + + // The CIDR block used for destination matches. + DestinationCidr *string `locationName:"destinationCidr" type:"string"` + + // The ID of the prefix list. + PrefixListId *string `locationName:"prefixListId" type:"string"` + + // The ID of the resource for the route attachment. + ResourceId *string `locationName:"resourceId" type:"string"` + + // The resource type for the route attachment. + ResourceType *string `locationName:"resourceType" type:"string"` + + // The route origin. The following are the possible values: + // + // * static + // + // * propagated + RouteOrigin *string `locationName:"routeOrigin" type:"string"` + + // The state of the route. + State *string `locationName:"state" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TransitGatewayRouteTableRoute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TransitGatewayRouteTableRoute) GoString() string { + return s.String() +} + +// SetAttachmentId sets the AttachmentId field's value. +func (s *TransitGatewayRouteTableRoute) SetAttachmentId(v string) *TransitGatewayRouteTableRoute { + s.AttachmentId = &v + return s +} + +// SetDestinationCidr sets the DestinationCidr field's value. +func (s *TransitGatewayRouteTableRoute) SetDestinationCidr(v string) *TransitGatewayRouteTableRoute { + s.DestinationCidr = &v + return s +} + +// SetPrefixListId sets the PrefixListId field's value. +func (s *TransitGatewayRouteTableRoute) SetPrefixListId(v string) *TransitGatewayRouteTableRoute { + s.PrefixListId = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayRouteTableRoute) SetResourceId(v string) *TransitGatewayRouteTableRoute { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayRouteTableRoute) SetResourceType(v string) *TransitGatewayRouteTableRoute { + s.ResourceType = &v + return s +} + +// SetRouteOrigin sets the RouteOrigin field's value. +func (s *TransitGatewayRouteTableRoute) SetRouteOrigin(v string) *TransitGatewayRouteTableRoute { + s.RouteOrigin = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayRouteTableRoute) SetState(v string) *TransitGatewayRouteTableRoute { + s.State = &v + return s +} + // Describes a VPC attachment. type TransitGatewayVpcAttachment struct { _ struct{} `type:"structure"` @@ -162278,6 +162823,22 @@ func InstanceAttributeName_Values() []string { } } +const ( + // InstanceAutoRecoveryStateDisabled is a InstanceAutoRecoveryState enum value + InstanceAutoRecoveryStateDisabled = "disabled" + + // InstanceAutoRecoveryStateDefault is a InstanceAutoRecoveryState enum value + InstanceAutoRecoveryStateDefault = "default" +) + +// InstanceAutoRecoveryState_Values returns all elements of the InstanceAutoRecoveryState enum +func InstanceAutoRecoveryState_Values() []string { + return []string{ + InstanceAutoRecoveryStateDisabled, + InstanceAutoRecoveryStateDefault, + } +} + const ( // InstanceEventWindowStateCreating is a InstanceEventWindowState enum value InstanceEventWindowStateCreating = "creating" @@ -164898,6 +165459,22 @@ func KeyType_Values() []string { } } +const ( + // LaunchTemplateAutoRecoveryStateDefault is a LaunchTemplateAutoRecoveryState enum value + LaunchTemplateAutoRecoveryStateDefault = "default" + + // LaunchTemplateAutoRecoveryStateDisabled is a LaunchTemplateAutoRecoveryState enum value + LaunchTemplateAutoRecoveryStateDisabled = "disabled" +) + +// LaunchTemplateAutoRecoveryState_Values returns all elements of the LaunchTemplateAutoRecoveryState enum +func LaunchTemplateAutoRecoveryState_Values() []string { + return []string{ + LaunchTemplateAutoRecoveryStateDefault, + LaunchTemplateAutoRecoveryStateDisabled, + } +} + const ( // LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist is a LaunchTemplateErrorCode enum value LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist = "launchTemplateIdDoesNotExist" diff --git a/vendor/modules.txt b/vendor/modules.txt index 0b5ac8e51..60e77b432 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -8,7 +8,7 @@ github.com/armon/go-metrics # github.com/armon/go-radix v1.0.0 ## explicit github.com/armon/go-radix -# github.com/aws/aws-sdk-go v1.43.22 +# github.com/aws/aws-sdk-go v1.43.32 ## explicit; go 1.11 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/awserr