Commit Graph

47 Commits

Author SHA1 Message Date
Damien Robichaud
3f1b2bb744 Add configs 2019-08-23 12:57:59 -07:00
Jeff Regan
40c613d0cd Merge pull request #1476 from damienr74/add-ui
Adds frontend + configs to interal/tools
2019-08-22 16:59:44 -07:00
Damien Robichaud
aa2bf7ed08 Adds frontend + configs to interal/tools/ui 2019-08-22 15:39:00 -07:00
Damien Robichaud
351df67e39 First draft of documentation for internal/tools 2019-08-21 17:01:59 -07:00
Damien Robichaud
66fa2de073 Add main backend service and configurations 2019-08-21 14:29:41 -07:00
Damien Robichaud
7783a76b8f Add internal tooling library for index queries. 2019-08-20 11:25:20 -07:00
Damien Robichaud
d3022ccd65 rename to tools directory 2019-08-16 11:25:20 -07:00
Damien Robichaud
fe45157b26 Update crawler to cache web request form github.
- Increase logging signal to noise ratio.
- Allow to specify the `http.Client` for github requests. (This allows
 the use of caching http.Clients).
- Clean up implementation.
2019-08-16 09:48:23 -07:00
Damien Robichaud
df779fd720 Modify document for elasticsearch migration. 2019-08-16 09:48:23 -07:00
Damien Robichaud
e0d388c6f7 Implements search query partitioning by filesize.
Binary searches through different ranges of file sizes to create search
queries with fewer than 1000 results. This is required since github will
only return the first 1000 result of any search query.

The implementation handles the case where some files may be deleted
while the search is running, and (possibly artificially) assures that the
number of files increases monotonically as the filesize range grows.

The implementation also caches queries and is expected to make fewer
than O((#files/1000) * lg(max file size)) API calls to retrieve the
range queries that can be used to index all of the files.

In practice running the search splitting takes a few minutes, while
retrieving all of the data takes a few hours.
2019-08-16 09:48:23 -07:00
Damien Robichaud
62edcae233 Implementation of configurable github crawler.
Currently I've left the search splitting by file size out of this commit
since it's ~200 lines of logic, and I think it's best to get it reviewed
separately.

In it's current state the crawler would only be able to get the last
1000 indexed files by Github, but it does show the general structure of
how the crawler is implemented.
2019-08-16 09:48:23 -07:00
Damien Robichaud
ac6918d70f Implementation of github query helper library.
To make this easier to read, use, and modify, I've abstracted the
important parts of the github query api into crawler/github/query.go
which allows to describe at a high level what is to be searched without
knowing the API syntax.
2019-08-16 09:48:23 -07:00
Damien Robichaud
ca41674df3 Implementation of basic crawler organisation.
`crawler.Crawler` interface is defined, where a crawler has to implement
a `Crawl` method that forwards document found by the crawler to a channel.

A helper function that launches a list of crawlers concurrently and
merges their channels into one main output channel, forwarding errors is
also implemented.

Finally, a test that verifies the correctness and concurrency of the
helper method is provided.
2019-08-16 09:48:23 -07:00
Damien Robichaud
c02b4f3a11 Initial (temporary) implementation of search doc.
Document describing how to convert a kustomization file into a
searchable document on appengine (will be changed to elasticsearch)
soon.
2019-08-16 09:48:23 -07:00
jregan
a7df00c07a Starting v3 release for plugin developers.
[doc]: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Per this Go modules [doc] a repo or branch that's
already tagged v2 or higher should increment the major
version (e.g. go to v3) when releasing their first Go
module-based packages.

At the moment, the kustomize repo has these top level
packages in the sigs.k8s.io/kustomize module:

 - `cmd` - holds main program for kustomize

	 Conceivably someone can depend on this
	 package for integration tests.

 - `internal` - intentionally unreleased subpackages

 - `k8sdeps` - an adapter wrapping k8s dependencies

	 This exists only for use in pre-Go-modules kustomize-into-kubectl
	 integration and won't live much longer (as everything involved is
	 switching to Go modules).

 - `pkg` - kustomize packages for export

	 This should shrink in later versions, since
	 the surface area is too large, containing
	 sub-packages that should be in 'internal'.

 - `plugin` - holds main programs for plugins

This PR changes the top level go.mod file from

```
module sigs.k8s.io/kustomize
```

to

```
module sigs.k8s.io/kustomize/v3
```

and adjusts all import statements to
reflect the change.
2019-06-23 15:05:59 -07:00
jregan
47c965481f Reduce k8ds deps 2019-05-27 15:37:03 -07:00
Jeffrey Regan
3a85fcd365 Simplify some of the plugin testing code. 2019-05-17 16:13:55 -07:00
jregan
4df576869f Add SedTransformerTest 2019-05-12 11:32:33 -07:00
Jingfang Liu
61d46c26b8 fix the boilerplate copyright header (#1064) 2019-05-10 10:20:20 -07:00
Jeffrey Regan
8991bcb399 Collect existing internal pkgs under one roof. 2019-04-23 11:53:50 -07:00
Jeffrey Regan
1545e07dd6 Add a plugin loader test. 2019-04-22 15:00:32 -07:00
Benjamin Elder
76ba38cec5 make k8sdeps.NewFactory() importable 2018-10-25 17:21:58 -07:00
Jingfang Liu
fdf5fa58d3 Allow setting shell and timeout in generatorOptions 2018-10-22 16:10:56 -07:00
Jingfang Liu
0cb02f1448 allow add labels/annotations to generated resources 2018-10-19 15:40:06 -07:00
Jingfang Liu
482811460d fix kustomize edit add label bug 2018-10-18 10:01:18 -07:00
Jingfang Liu
8209aeea6d fix copyright misalignment (#472) 2018-10-16 11:02:47 -07:00
Jingfang Liu
9d804ba3a8 fix lint errors in internal (#469) 2018-10-15 13:38:32 -07:00
Jingfang Liu
808df20cdb add missing lines after copyright (#468) 2018-10-15 12:02:41 -07:00
jregan
f20528be35 Delete some kunstruct code in favor of apimachinery code. 2018-10-15 10:23:03 -07:00
jregan
aaee97c0fa Improve unstruct test coverage and error messages. 2018-10-15 09:44:00 -07:00
jregan
dcc9c4d31a Move yaml check to file in which it is called. 2018-10-15 09:20:01 -07:00
Jeffrey Regan
d9f9a51e55 Fix names/doc in transformation config code. 2018-10-12 13:36:22 -07:00
Jingfang Liu
40b2bf76ae Add KustFactory as a wrapper of all factories 2018-10-11 13:51:27 -07:00
k8s-ci-robot
6fa110d4fd Merge pull request #457 from Liujingfang1/split
split k8sdeps package into sub packages
2018-10-11 11:36:00 -07:00
Jingfang Liu
d33d154e14 split k8sdeps package into sub packages 2018-10-11 11:30:46 -07:00
Jingfang Liu
f3e4615a33 use FakeFileSystem in configmapandsecret tests 2018-10-11 11:04:26 -07:00
Jingfang Liu
2953dad221 add MakeHashTransformer in TransformerFactory; remove hash interface 2018-10-10 14:05:13 -07:00
Jingfang Liu
96091dfcf5 remove decoder interface since it is only used inside k8sdeps 2018-10-10 11:08:23 -07:00
Jingfang Liu
4c7b63a215 remove dependency on apimachinery from gvk package 2018-10-09 16:25:25 -07:00
Jingfang Liu
f783486057 hide core/v1 behind interface 2018-10-09 15:50:52 -07:00
Jeff Regan
30814302af Fix some minor naming mistakes. (#434)
* Fix some minor naming mistakes.

* Fix some minor naming mistakes.
2018-10-08 15:58:44 -07:00
Jingfang Liu
78de5374ed hide patch transformer behind interface 2018-10-08 15:15:03 -07:00
Jeffrey Regan
1af119db80 Further isolate unstructured with factories. 2018-10-08 14:21:48 -07:00
jregan
4eb2757847 Further isolate unstructured with factories. 2018-10-08 11:52:38 -07:00
jregan
0f5a39f328 Hide unstructured.Unstructured behind interface. 2018-10-08 11:12:06 -07:00
Jingfang Liu
5036a12a65 Add hash interface 2018-10-05 13:29:06 -07:00
Jeffrey Regan
e32e5c21d7 Isolate k8sdeps to top level internal. 2018-10-03 10:21:43 -07:00