Commit Graph

467 Commits

Author SHA1 Message Date
Curt Micol
bdfdf8d38e Remove deprecated method for pushing images to GCR
Signed-off-by: Curt Micol <asenchi@heptio.com>
2018-04-18 15:28:08 -04:00
Nolan Brubaker
19c2fe3aaf Merge pull request #429 from skriss/minimal-gcp-policy
GCP: create/use IAM role with minimal set of permissions
2018-04-18 14:31:43 -04:00
Steve Kriss
6549ef8075 GCP: create/use IAM role with minimal set of permissions
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-17 11:22:35 -07:00
Andy Goldstein
1f6b496f5e Merge pull request #427 from containscafeine/add-common-deployment
Add examples/common/10-deployment.yaml back
2018-04-17 09:27:38 -04:00
Shubham
d47887a807 Remove references to common/10-deployment.yaml
The changes in 1db966bf3c (diff-c31a634b9c201723f2478087620b10c5) removed examples/common/10-deployment.yaml, which is listed in
README.md to start the server  at -
https://github.com/heptio/ark#set-up-server

This commit removes the references from the documentation.

Signed-off-by: Shubham <shubham@linux.com>
2018-04-17 18:37:28 +05:30
Andy Goldstein
71e1e2990e Merge pull request #425 from lypht/fix_gcp_ns
Reverting namespace to single namespace deployment
2018-04-13 09:23:49 -04:00
Josh Hull
e7098e5d88 Fixes the remaining three occurrences of the old namespace
Signed-off-by: Josh Hull <josh.hull@lypht.com>
2018-04-13 06:37:00 -05:00
Josh Hull
b446f66baa Reverting namespace to single namespace deployment
Signed-off-by: Josh Hull <josh.hull@lypht.com>
2018-04-13 06:25:15 -05:00
Nolan Brubaker
288ce9f33c Merge pull request #402 from domderen/kube2iam
Documentation on using ark with kube2iam
2018-04-12 14:20:19 -04:00
Dominik Deren
1db966bf3c Documentation on using ark with kube2iam
This PR updates the documentation & example deployment template to show how `ark` can be ran utilizing [https://github.com/jtblin/kube2iam](Kube2iam) for AWS IAM permissions, rather than using access key & secret key.

Signed-off-by: Dominik Deren <dominik.deren@live.com>
2018-04-12 10:53:23 -07:00
Andy Goldstein
2e08fd40a7 Merge pull request #419 from hopkinsth/fix/s3-perms
fix/s3-perms
2018-04-12 11:30:22 -04:00
Andy Goldstein
3a85f25e2b Merge pull request #415 from ffd2subroutine/add-node-selector
add nodeSelector so that ark server doesn't end up on a windows node …
2018-04-12 11:28:41 -04:00
Andy Goldstein
730ddb2113 Merge pull request #391 from containscafeine/handle-restore-missing-error
Introduce validation logic to `ark restore logs`
2018-04-12 11:07:29 -04:00
Andy Goldstein
e78c892a59 Merge pull request #384 from containscafeine/add-bash-zsh-completion
Add bash and zsh completion support
2018-04-12 11:00:53 -04:00
Shubham Minglani
7f3e88151b Add bash and zsh completion support
This commit adds support for auto completion for bash and zsh
shells. A new root level command called "completion" has been
introduced, and the user can get the auto completion code by
running `ark completion bash/zsh`.

For bash completion, the built-in GenBashCompletion() from cobra
has been used, but for zsh, the built-in GenZshCompletion() is
known to cause issues. The workaround has been copied from zsh
completion code of kubectl.

Signed-off-by: Shubham <shubham@linux.com>
2018-04-12 13:26:23 +05:30
Shubham
468c4faf1b Introduce validation logic to ark restore logs
This commit introduces validation logic to `ark restore logs`
command, the way it already exists in other commands like `ark
restore create`.

Before the logs for a restore are fetched from the server, the
server is contacted to check if the specified restore exists. If
it does not, it errors out.

Fixes #389

Signed-off-by: Shubham <shubham@linux.com>
2018-04-12 13:06:32 +05:30
Andy Goldstein
a48cc6ed23 Merge pull request #421 from skriss/changelog-typos
fix typos in changelog
2018-04-11 14:53:02 -04:00
Steve Kriss
352d667e13 fix typos in changelog
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-11 11:39:33 -07:00
Andy Goldstein
8a9fdc4316 Merge pull request #420 from skriss/v0.8.0-rc.1-changelog
update changelog for v0.8.0-rc.1
v0.8.0-rc.1
2018-04-11 13:56:30 -04:00
Steve Kriss
099f91f8fb update changelog for v0.8.0-rc.1
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-11 10:39:38 -07:00
Andy Goldstein
0998f6d8af Merge pull request #405 from nrb/ignore-duplicates
Compare for duplicates before logging object exists errors
2018-04-11 09:47:37 -04:00
Thomas Hopkins
612fe31bff move AbortMultipartUpload and ListMultipartUploadParts to the object-level IAM policy statement
Signed-off-by: Thomas Hopkins <hopkinsth@gmail.com>
2018-04-10 20:32:09 -04:00
Nolan Brubaker
33cc85cd0c Compare backup and cluster objects before logging
When restoring resources that raise an already exists error, check their
equality before logging a message on the restore. If they're the same
except for some metadata, don't generate a message.

The restore process was modified so that if an object had an empty
namespace string, no namespace key is created on the object. This was to
avoid manipulating the copy of the current cluster's object by adding
the target namespace.

There are some cases right now that are known to not be equal via this
method:

- The `default` ServiceAccount in a namespace will not match, primarily
because of differing default tokens. These will be handled in their own
patch
- IP addresses for Services are recorded in the backup object, but are
either not present on the cluster object, or different. An issue for
this already exists at https://github.com/heptio/ark/issues/354
- Endpoints have differing values for `renewTime`. This may be
insubstantial, but isn't currently handled by the resetMetadataAndStatus
function.
- PersistentVolume objects do not match on spec fields, such as
claimRef and cloud provider persistent disk info

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-04-10 14:55:48 -04:00
Andy Goldstein
258f3e011e Merge pull request #409 from skriss/fix-398
get backup name from restore spec when handling restore DownloadRequests
2018-04-10 13:29:07 -04:00
Andy Goldstein
278c1c6087 Merge pull request #414 from skriss/unit-test-fix
add helper function to compare slices of actions reliably and fix test flake
2018-04-10 13:27:26 -04:00
Nolan Brubaker
b6b87668c0 Add equality dependency
Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-04-10 12:27:54 -04:00
Steve Kriss
0d2b49acce get backup name from restore spec when handling restore DownloadRequests
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-09 10:50:10 -07:00
Steve Kriss
5bb47d2b7a extract a helper for comparing slices of Actions reliably
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-09 09:39:33 -07:00
ffd2subroutine
bcd63bf0e8 add nodeSelector so that ark server doesn't end up on a windows node when running a hybrid cluster
Signed-off-by: ffd2subroutine <ffd2subroutine@users.noreply.github.com>
2018-04-09 09:33:17 +02:00
Steve Kriss
25d46a709b Merge pull request #383 from ncdc/delete-backup-request
Switch from finalizer to DeleteBackupRequest for deleting backups
2018-04-06 12:24:35 -07:00
Andy Goldstein
3f2e222ae4 Don't allow deletion of in-progress backups
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-06 13:08:39 -04:00
Andy Goldstein
644a75e3c1 Set DeleteBackupRequest labels if missing
When the BackupDeletionController processes a request, set the request's
backup-name and backup-uid labels if they aren't currently set.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 15:38:44 -04:00
Andy Goldstein
ef57a44827 Require DeleteBackupRequest.Spec.BackupName
Make sure a DeleteBackupRequest has its Spec.BackupName filled in. If
not, record an error in the status and mark the request as processed.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 14:53:10 -04:00
Andy Goldstein
4328b67f93 backup delete/describe enhancements
Always request DeleteBackupRequests for a given backup so we can show
failed deletion attempts if you try to delete a backup that has PV
snapshots when Ark doesn't have a persistentVolumeProvider configured.

When creating a DeleteBackupRequest, include a label for the UID so we
can match based on name and UID when associated DeleteBackupRequests
with a given backup.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 14:21:45 -04:00
Andy Goldstein
a4d5061a02 Regen docs
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 11:19:11 -04:00
Andy Goldstein
1ae492da6c Expire processed deleted backup requests > 24hr
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 11:19:11 -04:00
Andy Goldstein
dd9b9f3bba Add DeleteBackupRequest CRD to 00-prereqs.yaml
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 11:19:11 -04:00
Andy Goldstein
1545406472 Switch back to heptio-ark for the server
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 11:19:11 -04:00
Andy Goldstein
74f60b1ee1 Switch backup finalizer to DeleteBackupRequest
We ran into a lot of problems using a finalizer on the backup to allow
the Ark server to clean up all associated backup data when deleting a
backup.

Users also found it less than desirable that deleting the heptio-ark
namespace resulted in all the backup data being deleted.

This removes the finalizer and replaces it with an explicit
DeleteBackupRequest that is created as a means of requesting the
deletion of a backup and all its associated data. This is what `ark
backup delete` does.

If you use kubectl to delete a backup or to delete the heptio-ark
namespace, this no longer deletes associated backups. Additionally, as
long as the heptio-ark namespace still exists, the Ark server's
BackupSyncController will continually sync backups into the heptio-ark
namespace from object storage.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-05 11:16:15 -04:00
Andy Goldstein
b0a2a0bf7b Remove k8s.io/code-generator dependency
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-04 16:44:16 -04:00
Andy Goldstein
1455d67152 Use a custom builder image
Use a custom builder image to do all of Ark's builds. This image now
contains k8s.io/code-generator for code generation.

Enable docker in travis to use the builder image.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-04 16:44:16 -04:00
Andy Goldstein
a5f2fec0a0 Update deps to pull in json-patch
Now that we've configured pruning for dep, this removes all unused
packages, all non-go files, and all tests from the vendor directory.

NOTE: due to a change in dep, it preserves anything that looks like a
license file. We'll be pulling in a few files we weren't previously
using - mostly license files. It's easier to just go with what dep does
than to try to exclude them after the fact.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-04 16:44:16 -04:00
Andy Goldstein
4d8fb900c6 Update dep info
- Add pruning settings to Gopkg.toml
- Update vendoring deps doc to point to dep installation instructions
  and to use dep instead of hack/dep-save.sh
- Remove hack/dep-save.sh

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-04-04 16:44:16 -04:00
Andy Goldstein
d1293825ef Merge pull request #412 from skriss/cmd-changes
use cobra's arg-count validation & call Complete() before Validate()
2018-04-04 16:39:48 -04:00
Steve Kriss
80b66434c0 move getting client into Complete()
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-03 20:43:42 -07:00
Steve Kriss
c60e47dedd use cobra's arg-count validation & call Complete() before Validate()
Signed-off-by: Steve Kriss <steve@heptio.com>
2018-04-03 09:45:29 -07:00
Andy Goldstein
a2f5e14a32 Merge pull request #392 from containscafeine/prioritize-limitranges
Add limitranges to defaultResourcePriorities
2018-03-20 09:22:19 -04:00
Shubham
73499c2cff Add limitranges to defaultResourcePriorities
This commit adds limitranges to defaultResourcePriorities as
suggested in #385.

This is done so that pods are not restored before the LimitRange
objects, because that would lead to pods not honoring the requests
and limits set in LimitRange objects.

Fixes #385

Signed-off-by: Shubham <shubham@linux.com>
2018-03-17 21:13:44 +05:30
Andy Goldstein
3063d33d71 Merge pull request #388 from containscafeine/fix-error-typo
Fix typo: replace ; with :
2018-03-16 08:59:57 -04:00
Shubham
560f9504e1 Fix typo: replace ; with :
This commit replaces a ; with a : in an error message

Signed-off-by: Shubham <shubham@linux.com>
2018-03-16 18:24:34 +05:30