-
Notifications
You must be signed in to change notification settings - Fork 4.7k
start running the access tokens and huge services test #17671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| defaultBaseImage: gcr.io/distroless/static-debian12 | ||
| defaultLdflags: | ||
| - -s -w | ||
| - -X k8s.io/kops.Version={{.Env.VERSION}} | ||
| - -X k8s.io/kops.GitVersion={{.Env.GITSHA}} | ||
| - -s -w | ||
| - -X k8s.io/kops.Version={{.Env.VERSION}} | ||
| - -X k8s.io/kops.GitVersion={{.Env.GITSHA}} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,7 @@ func (b *LogrotateBuilder) Build(c *fi.NodeupModelBuilderContext) error { | |
| } | ||
|
|
||
| b.addLogRotate(c, "docker", "/var/log/docker.log", logRotateOptions{}) | ||
| b.addLogRotate(c, "kops-controller", "/var/log/kops-controller.log", logRotateOptions{}) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think kops-controller is "just a pod" and doesn't write logs here. But it is relatively important, so I think we could make the case for doing so... |
||
| b.addLogRotate(c, "kube-addons", "/var/log/kube-addons.log", logRotateOptions{}) | ||
| b.addLogRotate(c, "kube-apiserver", "/var/log/kube-apiserver.log", logRotateOptions{}) | ||
| b.addLogRotate(c, "kube-controller-manager", "/var/log/kube-controller-manager.log", logRotateOptions{}) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,14 @@ func (b *ExternalAccessModelBuilder) Build(c *fi.CloudupModelBuilderContext) err | |
| if err != nil { | ||
| return err | ||
| } | ||
| b.AddFirewallRulesTasks(c, "ssh-external-to-master", &gcetasks.FirewallRule{ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this hits the "main code path" of kOps. Can we SSH through the bastion? Or if not, can we somehow make this not change the configuration for "everyone else" - e.g. with a feature flag or by adding something in the cluster or instancegroup? (The feature flag is normally easiest) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This specific change won't be in this PR, just need the patch to get the scale tests passing. It is being worked in a different PR |
||
| Lifecycle: b.Lifecycle, | ||
| TargetTags: []string{b.GCETagForRole(kops.InstanceGroupRoleControlPlane), b.GCETagForRole("Master")}, | ||
| Allowed: []string{"tcp:22"}, | ||
| SourceRanges: b.Cluster.Spec.SSHAccess, | ||
| Network: network, | ||
| }) | ||
|
|
||
| b.AddFirewallRulesTasks(c, "ssh-external-to-bastion", &gcetasks.FirewallRule{ | ||
| Lifecycle: b.Lifecycle, | ||
| TargetTags: []string{b.GCETagForRole(kops.InstanceGroupRoleBastion)}, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,7 @@ import ( | |
| "k8s.io/kops/tests/e2e/pkg/target" | ||
| "k8s.io/kops/tests/e2e/pkg/util" | ||
| "sigs.k8s.io/kubetest2/pkg/boskos" | ||
| "sigs.k8s.io/kubetest2/pkg/exec" | ||
| ) | ||
|
|
||
| func (d *deployer) init() error { | ||
|
|
@@ -112,6 +113,16 @@ func (d *deployer) initialize() error { | |
| d.GCPProject = resource.Name | ||
| klog.V(1).Infof("Got project %s from boskos", d.GCPProject) | ||
|
|
||
| if os.Getenv("SCALE_SCENARIO") == "performance" { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not required after kubernetes/perf-tests#3653 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| // Performance scale tests require gcloud config set project to be ran | ||
| cmd := exec.Command("gcloud", "config", "set", "project", d.GCPProject) | ||
| klog.V(1).Infof("Running command: %q", cmd) | ||
| exec.InheritOutput(cmd) | ||
| if err := cmd.Run(); err != nil { | ||
| return err | ||
| } | ||
| } | ||
|
|
||
| if d.SSHPrivateKeyPath == "" { | ||
| d.SSHPrivateKeyPath = os.Getenv("GCE_SSH_PRIVATE_KEY_FILE") | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,15 +168,7 @@ func (d *deployer) createCluster(zones []string, adminAccess string, yes bool) e | |
| "--kubernetes-version", d.KubernetesVersion, | ||
| "--ssh-public-key", d.SSHPublicKeyPath, | ||
| "--set", "cluster.spec.nodePortAccess=0.0.0.0/0", | ||
| } | ||
|
|
||
| version, err := kops.GetVersion(d.KopsBinaryPath) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| if version > "1.29" { | ||
| // Requires https://github.com/kubernetes/kops/pull/16128 | ||
| args = append(args, "--set", `spec.containerd.configAdditions=plugins."io.containerd.grpc.v1.cri".containerd.runtimes.test-handler.runtime_type=io.containerd.runc.v2`) | ||
| "--set", `spec.containerd.configAdditions=plugins."io.containerd.grpc.v1.cri".containerd.runtimes.test-handler.runtime_type=io.containerd.runc.v2`, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a cleanup for handling of old kube versions that we no longer test? (I.e. could be split into its own PR, though that would be a very short PR!) |
||
| } | ||
|
|
||
| if yes { | ||
|
|
@@ -265,12 +257,12 @@ func (d *deployer) createCluster(zones []string, adminAccess string, yes bool) e | |
| cmd.SetEnv(d.env()...) | ||
|
|
||
| exec.InheritOutput(cmd) | ||
| err = cmd.Run() | ||
| err := cmd.Run() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 I like |
||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| if d.setInstanceGroupOverrides(); err != nil { | ||
| if err = d.setInstanceGroupOverrides(); err != nil { | ||
| return err | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,9 @@ spec: | |
| - args: | ||
| - --v=2 | ||
| - --conf=/etc/kubernetes/kops-controller/config/config.yaml | ||
| - --log_file=/var/log/kops-controller.log | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. found this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A blast from the past :-) |
||
| - --logtostderr=false | ||
| - --alsologtostderr | ||
| command: null | ||
| env: | ||
| - name: KUBERNETES_SERVICE_HOST | ||
|
|
@@ -68,14 +71,13 @@ spec: | |
| requests: | ||
| cpu: 50m | ||
| memory: 50Mi | ||
| securityContext: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there's a case that kops-controller is important so should have a log in /var/log, but the components that are there today are the ones that we can't get with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There isn't a performance issue and assuming the control plane is bootstrapped, we can see the logs from kops toolbox dump. Happy to remove it if it's too tricky |
||
| runAsNonRoot: true | ||
| runAsUser: 10011 | ||
| volumeMounts: | ||
| - mountPath: /etc/kubernetes/kops-controller/config/ | ||
| name: kops-controller-config | ||
| - mountPath: /etc/kubernetes/kops-controller/pki/ | ||
| name: kops-controller-pki | ||
| - mountPath: /var/log/kops-controller.log | ||
| name: logfile | ||
| dnsPolicy: Default | ||
| hostNetwork: true | ||
| nodeSelector: null | ||
|
|
@@ -98,6 +100,10 @@ spec: | |
| path: /etc/kubernetes/kops-controller/ | ||
| type: Directory | ||
| name: kops-controller-pki | ||
| - hostPath: | ||
| path: /var/log/kops-controller.log | ||
| type: FileOrCreate | ||
| name: logfile | ||
| updateStrategy: | ||
| type: OnDelete | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 to introducing this file so we can more easily configure some of these ko options, for example I realized we aren't passing the Version properly to ko